mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-492e792fcefe12c5/out/
paparazzi.rs

1#![doc = "MAVLink paparazzi dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#![allow(clippy::match_single_binding)]
6#[cfg(feature = "arbitrary")]
7use arbitrary::Arbitrary;
8#[allow(unused_imports)]
9use bitflags::{bitflags, Flags};
10#[allow(unused_imports)]
11use mavlink_core::{
12    bytes::Bytes, bytes_mut::BytesMut, types::CharArray, MavlinkVersion, Message, MessageData,
13};
14#[allow(unused_imports)]
15use num_derive::{FromPrimitive, ToPrimitive};
16#[allow(unused_imports)]
17use num_traits::{FromPrimitive, ToPrimitive};
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20#[cfg(feature = "ts")]
21use ts_rs::TS;
22pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
23#[cfg_attr(feature = "ts", derive(TS))]
24#[cfg_attr(feature = "ts", ts(export))]
25#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
26#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27#[cfg_attr(feature = "serde", serde(tag = "type"))]
28#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29#[repr(u32)]
30#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
31pub enum ActuatorConfiguration {
32    #[doc = "Do nothing."]
33    ACTUATOR_CONFIGURATION_NONE = 0,
34    #[doc = "Command the actuator to beep now."]
35    ACTUATOR_CONFIGURATION_BEEP = 1,
36    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
37    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
38    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
39    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
40    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
41    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
42    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
43    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
44}
45impl ActuatorConfiguration {
46    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
47}
48impl Default for ActuatorConfiguration {
49    fn default() -> Self {
50        Self::DEFAULT
51    }
52}
53#[cfg_attr(feature = "ts", derive(TS))]
54#[cfg_attr(feature = "ts", ts(export))]
55#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
56#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
57#[cfg_attr(feature = "serde", serde(tag = "type"))]
58#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
59#[repr(u32)]
60#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
61pub enum ActuatorOutputFunction {
62    #[doc = "No function (disabled)."]
63    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
64    #[doc = "Motor 1"]
65    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
66    #[doc = "Motor 2"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
68    #[doc = "Motor 3"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
70    #[doc = "Motor 4"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
72    #[doc = "Motor 5"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
74    #[doc = "Motor 6"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
76    #[doc = "Motor 7"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
78    #[doc = "Motor 8"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
80    #[doc = "Motor 9"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
82    #[doc = "Motor 10"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
84    #[doc = "Motor 11"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
86    #[doc = "Motor 12"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
88    #[doc = "Motor 13"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
90    #[doc = "Motor 14"]
91    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
92    #[doc = "Motor 15"]
93    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
94    #[doc = "Motor 16"]
95    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
96    #[doc = "Servo 1"]
97    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
98    #[doc = "Servo 2"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
100    #[doc = "Servo 3"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
102    #[doc = "Servo 4"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
104    #[doc = "Servo 5"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
106    #[doc = "Servo 6"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
108    #[doc = "Servo 7"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
110    #[doc = "Servo 8"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
112    #[doc = "Servo 9"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
114    #[doc = "Servo 10"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
116    #[doc = "Servo 11"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
118    #[doc = "Servo 12"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
120    #[doc = "Servo 13"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
122    #[doc = "Servo 14"]
123    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
124    #[doc = "Servo 15"]
125    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
126    #[doc = "Servo 16"]
127    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
128}
129impl ActuatorOutputFunction {
130    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
131}
132impl Default for ActuatorOutputFunction {
133    fn default() -> Self {
134        Self::DEFAULT
135    }
136}
137#[cfg_attr(feature = "ts", derive(TS))]
138#[cfg_attr(feature = "ts", ts(export))]
139#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
140#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
141#[cfg_attr(feature = "serde", serde(tag = "type"))]
142#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
143#[repr(u32)]
144#[doc = "Enumeration of the ADSB altimeter types"]
145pub enum AdsbAltitudeType {
146    #[doc = "Altitude reported from a Baro source using QNH reference"]
147    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
148    #[doc = "Altitude reported from a GNSS source"]
149    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
150}
151impl AdsbAltitudeType {
152    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
153}
154impl Default for AdsbAltitudeType {
155    fn default() -> Self {
156        Self::DEFAULT
157    }
158}
159#[cfg_attr(feature = "ts", derive(TS))]
160#[cfg_attr(feature = "ts", ts(export))]
161#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
162#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
163#[cfg_attr(feature = "serde", serde(tag = "type"))]
164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
165#[repr(u32)]
166#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
167pub enum AdsbEmitterType {
168    ADSB_EMITTER_TYPE_NO_INFO = 0,
169    ADSB_EMITTER_TYPE_LIGHT = 1,
170    ADSB_EMITTER_TYPE_SMALL = 2,
171    ADSB_EMITTER_TYPE_LARGE = 3,
172    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
173    ADSB_EMITTER_TYPE_HEAVY = 5,
174    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
175    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
176    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
177    ADSB_EMITTER_TYPE_GLIDER = 9,
178    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
179    ADSB_EMITTER_TYPE_PARACHUTE = 11,
180    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
181    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
182    ADSB_EMITTER_TYPE_UAV = 14,
183    ADSB_EMITTER_TYPE_SPACE = 15,
184    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
185    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
186    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
187    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
188}
189impl AdsbEmitterType {
190    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
191}
192impl Default for AdsbEmitterType {
193    fn default() -> Self {
194        Self::DEFAULT
195    }
196}
197bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
198impl AdsbFlags {
199    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
200}
201impl Default for AdsbFlags {
202    fn default() -> Self {
203        Self::DEFAULT
204    }
205}
206bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
207impl AisFlags {
208    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
209}
210impl Default for AisFlags {
211    fn default() -> Self {
212        Self::DEFAULT
213    }
214}
215#[cfg_attr(feature = "ts", derive(TS))]
216#[cfg_attr(feature = "ts", ts(export))]
217#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
219#[cfg_attr(feature = "serde", serde(tag = "type"))]
220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
221#[repr(u32)]
222#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
223pub enum AisNavStatus {
224    #[doc = "Under way using engine."]
225    UNDER_WAY = 0,
226    AIS_NAV_ANCHORED = 1,
227    AIS_NAV_UN_COMMANDED = 2,
228    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
229    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
230    AIS_NAV_MOORED = 5,
231    AIS_NAV_AGROUND = 6,
232    AIS_NAV_FISHING = 7,
233    AIS_NAV_SAILING = 8,
234    AIS_NAV_RESERVED_HSC = 9,
235    AIS_NAV_RESERVED_WIG = 10,
236    AIS_NAV_RESERVED_1 = 11,
237    AIS_NAV_RESERVED_2 = 12,
238    AIS_NAV_RESERVED_3 = 13,
239    #[doc = "Search And Rescue Transponder."]
240    AIS_NAV_AIS_SART = 14,
241    #[doc = "Not available (default)."]
242    AIS_NAV_UNKNOWN = 15,
243}
244impl AisNavStatus {
245    pub const DEFAULT: Self = Self::UNDER_WAY;
246}
247impl Default for AisNavStatus {
248    fn default() -> Self {
249        Self::DEFAULT
250    }
251}
252#[cfg_attr(feature = "ts", derive(TS))]
253#[cfg_attr(feature = "ts", ts(export))]
254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
256#[cfg_attr(feature = "serde", serde(tag = "type"))]
257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
258#[repr(u32)]
259#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
260pub enum AisType {
261    #[doc = "Not available (default)."]
262    AIS_TYPE_UNKNOWN = 0,
263    AIS_TYPE_RESERVED_1 = 1,
264    AIS_TYPE_RESERVED_2 = 2,
265    AIS_TYPE_RESERVED_3 = 3,
266    AIS_TYPE_RESERVED_4 = 4,
267    AIS_TYPE_RESERVED_5 = 5,
268    AIS_TYPE_RESERVED_6 = 6,
269    AIS_TYPE_RESERVED_7 = 7,
270    AIS_TYPE_RESERVED_8 = 8,
271    AIS_TYPE_RESERVED_9 = 9,
272    AIS_TYPE_RESERVED_10 = 10,
273    AIS_TYPE_RESERVED_11 = 11,
274    AIS_TYPE_RESERVED_12 = 12,
275    AIS_TYPE_RESERVED_13 = 13,
276    AIS_TYPE_RESERVED_14 = 14,
277    AIS_TYPE_RESERVED_15 = 15,
278    AIS_TYPE_RESERVED_16 = 16,
279    AIS_TYPE_RESERVED_17 = 17,
280    AIS_TYPE_RESERVED_18 = 18,
281    AIS_TYPE_RESERVED_19 = 19,
282    #[doc = "Wing In Ground effect."]
283    AIS_TYPE_WIG = 20,
284    AIS_TYPE_WIG_HAZARDOUS_A = 21,
285    AIS_TYPE_WIG_HAZARDOUS_B = 22,
286    AIS_TYPE_WIG_HAZARDOUS_C = 23,
287    AIS_TYPE_WIG_HAZARDOUS_D = 24,
288    AIS_TYPE_WIG_RESERVED_1 = 25,
289    AIS_TYPE_WIG_RESERVED_2 = 26,
290    AIS_TYPE_WIG_RESERVED_3 = 27,
291    AIS_TYPE_WIG_RESERVED_4 = 28,
292    AIS_TYPE_WIG_RESERVED_5 = 29,
293    AIS_TYPE_FISHING = 30,
294    AIS_TYPE_TOWING = 31,
295    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
296    AIS_TYPE_TOWING_LARGE = 32,
297    #[doc = "Dredging or other underwater ops."]
298    AIS_TYPE_DREDGING = 33,
299    AIS_TYPE_DIVING = 34,
300    AIS_TYPE_MILITARY = 35,
301    AIS_TYPE_SAILING = 36,
302    AIS_TYPE_PLEASURE = 37,
303    AIS_TYPE_RESERVED_20 = 38,
304    AIS_TYPE_RESERVED_21 = 39,
305    #[doc = "High Speed Craft."]
306    AIS_TYPE_HSC = 40,
307    AIS_TYPE_HSC_HAZARDOUS_A = 41,
308    AIS_TYPE_HSC_HAZARDOUS_B = 42,
309    AIS_TYPE_HSC_HAZARDOUS_C = 43,
310    AIS_TYPE_HSC_HAZARDOUS_D = 44,
311    AIS_TYPE_HSC_RESERVED_1 = 45,
312    AIS_TYPE_HSC_RESERVED_2 = 46,
313    AIS_TYPE_HSC_RESERVED_3 = 47,
314    AIS_TYPE_HSC_RESERVED_4 = 48,
315    AIS_TYPE_HSC_UNKNOWN = 49,
316    AIS_TYPE_PILOT = 50,
317    #[doc = "Search And Rescue vessel."]
318    AIS_TYPE_SAR = 51,
319    AIS_TYPE_TUG = 52,
320    AIS_TYPE_PORT_TENDER = 53,
321    #[doc = "Anti-pollution equipment."]
322    AIS_TYPE_ANTI_POLLUTION = 54,
323    AIS_TYPE_LAW_ENFORCEMENT = 55,
324    AIS_TYPE_SPARE_LOCAL_1 = 56,
325    AIS_TYPE_SPARE_LOCAL_2 = 57,
326    AIS_TYPE_MEDICAL_TRANSPORT = 58,
327    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
328    AIS_TYPE_NONECOMBATANT = 59,
329    AIS_TYPE_PASSENGER = 60,
330    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
331    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
332    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
333    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
334    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
335    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
336    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
337    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
338    AIS_TYPE_PASSENGER_UNKNOWN = 69,
339    AIS_TYPE_CARGO = 70,
340    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
341    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
342    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
343    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
344    AIS_TYPE_CARGO_RESERVED_1 = 75,
345    AIS_TYPE_CARGO_RESERVED_2 = 76,
346    AIS_TYPE_CARGO_RESERVED_3 = 77,
347    AIS_TYPE_CARGO_RESERVED_4 = 78,
348    AIS_TYPE_CARGO_UNKNOWN = 79,
349    AIS_TYPE_TANKER = 80,
350    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
351    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
352    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
353    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
354    AIS_TYPE_TANKER_RESERVED_1 = 85,
355    AIS_TYPE_TANKER_RESERVED_2 = 86,
356    AIS_TYPE_TANKER_RESERVED_3 = 87,
357    AIS_TYPE_TANKER_RESERVED_4 = 88,
358    AIS_TYPE_TANKER_UNKNOWN = 89,
359    AIS_TYPE_OTHER = 90,
360    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
361    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
362    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
363    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
364    AIS_TYPE_OTHER_RESERVED_1 = 95,
365    AIS_TYPE_OTHER_RESERVED_2 = 96,
366    AIS_TYPE_OTHER_RESERVED_3 = 97,
367    AIS_TYPE_OTHER_RESERVED_4 = 98,
368    AIS_TYPE_OTHER_UNKNOWN = 99,
369}
370impl AisType {
371    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
372}
373impl Default for AisType {
374    fn default() -> Self {
375        Self::DEFAULT
376    }
377}
378bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
379impl AttitudeTargetTypemask {
380    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
381}
382impl Default for AttitudeTargetTypemask {
383    fn default() -> Self {
384        Self::DEFAULT
385    }
386}
387#[cfg_attr(feature = "ts", derive(TS))]
388#[cfg_attr(feature = "ts", ts(export))]
389#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
391#[cfg_attr(feature = "serde", serde(tag = "type"))]
392#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
393#[repr(u32)]
394#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
395pub enum AutotuneAxis {
396    #[doc = "Autotune roll axis."]
397    AUTOTUNE_AXIS_ROLL = 1,
398    #[doc = "Autotune pitch axis."]
399    AUTOTUNE_AXIS_PITCH = 2,
400    #[doc = "Autotune yaw axis."]
401    AUTOTUNE_AXIS_YAW = 4,
402}
403impl AutotuneAxis {
404    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
405}
406impl Default for AutotuneAxis {
407    fn default() -> Self {
408        Self::DEFAULT
409    }
410}
411bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
412impl CameraCapFlags {
413    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
414}
415impl Default for CameraCapFlags {
416    fn default() -> Self {
417        Self::DEFAULT
418    }
419}
420#[cfg_attr(feature = "ts", derive(TS))]
421#[cfg_attr(feature = "ts", ts(export))]
422#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
424#[cfg_attr(feature = "serde", serde(tag = "type"))]
425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
426#[repr(u32)]
427#[doc = "Camera Modes."]
428pub enum CameraMode {
429    #[doc = "Camera is in image/photo capture mode."]
430    CAMERA_MODE_IMAGE = 0,
431    #[doc = "Camera is in video capture mode."]
432    CAMERA_MODE_VIDEO = 1,
433    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
434    CAMERA_MODE_IMAGE_SURVEY = 2,
435}
436impl CameraMode {
437    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
438}
439impl Default for CameraMode {
440    fn default() -> Self {
441        Self::DEFAULT
442    }
443}
444#[cfg_attr(feature = "ts", derive(TS))]
445#[cfg_attr(feature = "ts", ts(export))]
446#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
448#[cfg_attr(feature = "serde", serde(tag = "type"))]
449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
450#[repr(u32)]
451#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
452pub enum CameraSource {
453    #[doc = "Default camera source."]
454    CAMERA_SOURCE_DEFAULT = 0,
455    #[doc = "RGB camera source."]
456    CAMERA_SOURCE_RGB = 1,
457    #[doc = "IR camera source."]
458    CAMERA_SOURCE_IR = 2,
459    #[doc = "NDVI camera source."]
460    CAMERA_SOURCE_NDVI = 3,
461}
462impl CameraSource {
463    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
464}
465impl Default for CameraSource {
466    fn default() -> Self {
467        Self::DEFAULT
468    }
469}
470#[cfg_attr(feature = "ts", derive(TS))]
471#[cfg_attr(feature = "ts", ts(export))]
472#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
474#[cfg_attr(feature = "serde", serde(tag = "type"))]
475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
476#[repr(u32)]
477#[doc = "Camera tracking modes"]
478pub enum CameraTrackingMode {
479    #[doc = "Not tracking"]
480    CAMERA_TRACKING_MODE_NONE = 0,
481    #[doc = "Target is a point"]
482    CAMERA_TRACKING_MODE_POINT = 1,
483    #[doc = "Target is a rectangle"]
484    CAMERA_TRACKING_MODE_RECTANGLE = 2,
485}
486impl CameraTrackingMode {
487    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
488}
489impl Default for CameraTrackingMode {
490    fn default() -> Self {
491        Self::DEFAULT
492    }
493}
494#[cfg_attr(feature = "ts", derive(TS))]
495#[cfg_attr(feature = "ts", ts(export))]
496#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
498#[cfg_attr(feature = "serde", serde(tag = "type"))]
499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
500#[repr(u32)]
501#[doc = "Camera tracking status flags"]
502pub enum CameraTrackingStatusFlags {
503    #[doc = "Camera is not tracking"]
504    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
505    #[doc = "Camera is tracking"]
506    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
507    #[doc = "Camera tracking in error state"]
508    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
509}
510impl CameraTrackingStatusFlags {
511    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
512}
513impl Default for CameraTrackingStatusFlags {
514    fn default() -> Self {
515        Self::DEFAULT
516    }
517}
518bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
519impl CameraTrackingTargetData {
520    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
521}
522impl Default for CameraTrackingTargetData {
523    fn default() -> Self {
524        Self::DEFAULT
525    }
526}
527#[cfg_attr(feature = "ts", derive(TS))]
528#[cfg_attr(feature = "ts", ts(export))]
529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
531#[cfg_attr(feature = "serde", serde(tag = "type"))]
532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
533#[repr(u32)]
534#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
535pub enum CameraZoomType {
536    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
537    ZOOM_TYPE_STEP = 0,
538    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
539    ZOOM_TYPE_CONTINUOUS = 1,
540    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
541    ZOOM_TYPE_RANGE = 2,
542    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
543    ZOOM_TYPE_FOCAL_LENGTH = 3,
544    #[doc = "Zoom value as horizontal field of view in degrees."]
545    ZOOM_TYPE_HORIZONTAL_FOV = 4,
546}
547impl CameraZoomType {
548    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
549}
550impl Default for CameraZoomType {
551    fn default() -> Self {
552        Self::DEFAULT
553    }
554}
555#[cfg_attr(feature = "ts", derive(TS))]
556#[cfg_attr(feature = "ts", ts(export))]
557#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
558#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
559#[cfg_attr(feature = "serde", serde(tag = "type"))]
560#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
561#[repr(u32)]
562pub enum CanFilterOp {
563    CAN_FILTER_REPLACE = 0,
564    CAN_FILTER_ADD = 1,
565    CAN_FILTER_REMOVE = 2,
566}
567impl CanFilterOp {
568    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
569}
570impl Default for CanFilterOp {
571    fn default() -> Self {
572        Self::DEFAULT
573    }
574}
575#[cfg_attr(feature = "ts", derive(TS))]
576#[cfg_attr(feature = "ts", ts(export))]
577#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
579#[cfg_attr(feature = "serde", serde(tag = "type"))]
580#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
581#[repr(u32)]
582#[doc = "Possible responses from a CELLULAR_CONFIG message."]
583pub enum CellularConfigResponse {
584    #[doc = "Changes accepted."]
585    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
586    #[doc = "Invalid APN."]
587    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
588    #[doc = "Invalid PIN."]
589    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
590    #[doc = "Changes rejected."]
591    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
592    #[doc = "PUK is required to unblock SIM card."]
593    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
594}
595impl CellularConfigResponse {
596    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
597}
598impl Default for CellularConfigResponse {
599    fn default() -> Self {
600        Self::DEFAULT
601    }
602}
603#[cfg_attr(feature = "ts", derive(TS))]
604#[cfg_attr(feature = "ts", ts(export))]
605#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
606#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
607#[cfg_attr(feature = "serde", serde(tag = "type"))]
608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
609#[repr(u32)]
610#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
611pub enum CellularNetworkFailedReason {
612    #[doc = "No error"]
613    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
614    #[doc = "Error state is unknown"]
615    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
616    #[doc = "SIM is required for the modem but missing"]
617    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
618    #[doc = "SIM is available, but not usable for connection"]
619    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
620}
621impl CellularNetworkFailedReason {
622    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
623}
624impl Default for CellularNetworkFailedReason {
625    fn default() -> Self {
626        Self::DEFAULT
627    }
628}
629#[cfg_attr(feature = "ts", derive(TS))]
630#[cfg_attr(feature = "ts", ts(export))]
631#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
632#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
633#[cfg_attr(feature = "serde", serde(tag = "type"))]
634#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
635#[repr(u32)]
636#[doc = "Cellular network radio type"]
637pub enum CellularNetworkRadioType {
638    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
639    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
640    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
641    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
642    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
643}
644impl CellularNetworkRadioType {
645    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
646}
647impl Default for CellularNetworkRadioType {
648    fn default() -> Self {
649        Self::DEFAULT
650    }
651}
652#[cfg_attr(feature = "ts", derive(TS))]
653#[cfg_attr(feature = "ts", ts(export))]
654#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
656#[cfg_attr(feature = "serde", serde(tag = "type"))]
657#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
658#[repr(u32)]
659#[doc = "These flags encode the cellular network status"]
660pub enum CellularStatusFlag {
661    #[doc = "State unknown or not reportable."]
662    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
663    #[doc = "Modem is unusable"]
664    CELLULAR_STATUS_FLAG_FAILED = 1,
665    #[doc = "Modem is being initialized"]
666    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
667    #[doc = "Modem is locked"]
668    CELLULAR_STATUS_FLAG_LOCKED = 3,
669    #[doc = "Modem is not enabled and is powered down"]
670    CELLULAR_STATUS_FLAG_DISABLED = 4,
671    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
672    CELLULAR_STATUS_FLAG_DISABLING = 5,
673    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
674    CELLULAR_STATUS_FLAG_ENABLING = 6,
675    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
676    CELLULAR_STATUS_FLAG_ENABLED = 7,
677    #[doc = "Modem is searching for a network provider to register"]
678    CELLULAR_STATUS_FLAG_SEARCHING = 8,
679    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
680    CELLULAR_STATUS_FLAG_REGISTERED = 9,
681    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
682    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
683    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
684    CELLULAR_STATUS_FLAG_CONNECTING = 11,
685    #[doc = "One or more packet data bearers is active and connected"]
686    CELLULAR_STATUS_FLAG_CONNECTED = 12,
687}
688impl CellularStatusFlag {
689    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
690}
691impl Default for CellularStatusFlag {
692    fn default() -> Self {
693        Self::DEFAULT
694    }
695}
696#[cfg_attr(feature = "ts", derive(TS))]
697#[cfg_attr(feature = "ts", ts(export))]
698#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
699#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
700#[cfg_attr(feature = "serde", serde(tag = "type"))]
701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
702#[repr(u32)]
703#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
704pub enum CompMetadataType {
705    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
706    COMP_METADATA_TYPE_GENERAL = 0,
707    #[doc = "Parameter meta data."]
708    COMP_METADATA_TYPE_PARAMETER = 1,
709    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
710    COMP_METADATA_TYPE_COMMANDS = 2,
711    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
712    COMP_METADATA_TYPE_PERIPHERALS = 3,
713    #[doc = "Meta data for the events interface."]
714    COMP_METADATA_TYPE_EVENTS = 4,
715    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
716    COMP_METADATA_TYPE_ACTUATORS = 5,
717}
718impl CompMetadataType {
719    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
720}
721impl Default for CompMetadataType {
722    fn default() -> Self {
723        Self::DEFAULT
724    }
725}
726#[cfg_attr(feature = "ts", derive(TS))]
727#[cfg_attr(feature = "ts", ts(export))]
728#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
730#[cfg_attr(feature = "serde", serde(tag = "type"))]
731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
732#[repr(u32)]
733#[doc = "Indicates the ESC connection type."]
734pub enum EscConnectionType {
735    #[doc = "Traditional PPM ESC."]
736    ESC_CONNECTION_TYPE_PPM = 0,
737    #[doc = "Serial Bus connected ESC."]
738    ESC_CONNECTION_TYPE_SERIAL = 1,
739    #[doc = "One Shot PPM ESC."]
740    ESC_CONNECTION_TYPE_ONESHOT = 2,
741    #[doc = "I2C ESC."]
742    ESC_CONNECTION_TYPE_I2C = 3,
743    #[doc = "CAN-Bus ESC."]
744    ESC_CONNECTION_TYPE_CAN = 4,
745    #[doc = "DShot ESC."]
746    ESC_CONNECTION_TYPE_DSHOT = 5,
747}
748impl EscConnectionType {
749    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
750}
751impl Default for EscConnectionType {
752    fn default() -> Self {
753        Self::DEFAULT
754    }
755}
756bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
757impl EscFailureFlags {
758    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
759}
760impl Default for EscFailureFlags {
761    fn default() -> Self {
762        Self::DEFAULT
763    }
764}
765bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
766impl EstimatorStatusFlags {
767    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
768}
769impl Default for EstimatorStatusFlags {
770    fn default() -> Self {
771        Self::DEFAULT
772    }
773}
774#[cfg_attr(feature = "ts", derive(TS))]
775#[cfg_attr(feature = "ts", ts(export))]
776#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
777#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
778#[cfg_attr(feature = "serde", serde(tag = "type"))]
779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
780#[repr(u32)]
781#[doc = "List of possible failure type to inject."]
782pub enum FailureType {
783    #[doc = "No failure injected, used to reset a previous failure."]
784    FAILURE_TYPE_OK = 0,
785    #[doc = "Sets unit off, so completely non-responsive."]
786    FAILURE_TYPE_OFF = 1,
787    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
788    FAILURE_TYPE_STUCK = 2,
789    #[doc = "Unit is reporting complete garbage."]
790    FAILURE_TYPE_GARBAGE = 3,
791    #[doc = "Unit is consistently wrong."]
792    FAILURE_TYPE_WRONG = 4,
793    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
794    FAILURE_TYPE_SLOW = 5,
795    #[doc = "Data of unit is delayed in time."]
796    FAILURE_TYPE_DELAYED = 6,
797    #[doc = "Unit is sometimes working, sometimes not."]
798    FAILURE_TYPE_INTERMITTENT = 7,
799}
800impl FailureType {
801    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
802}
803impl Default for FailureType {
804    fn default() -> Self {
805        Self::DEFAULT
806    }
807}
808#[cfg_attr(feature = "ts", derive(TS))]
809#[cfg_attr(feature = "ts", ts(export))]
810#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
812#[cfg_attr(feature = "serde", serde(tag = "type"))]
813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
814#[repr(u32)]
815#[doc = "List of possible units where failures can be injected."]
816pub enum FailureUnit {
817    FAILURE_UNIT_SENSOR_GYRO = 0,
818    FAILURE_UNIT_SENSOR_ACCEL = 1,
819    FAILURE_UNIT_SENSOR_MAG = 2,
820    FAILURE_UNIT_SENSOR_BARO = 3,
821    FAILURE_UNIT_SENSOR_GPS = 4,
822    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
823    FAILURE_UNIT_SENSOR_VIO = 6,
824    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
825    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
826    FAILURE_UNIT_SYSTEM_BATTERY = 100,
827    FAILURE_UNIT_SYSTEM_MOTOR = 101,
828    FAILURE_UNIT_SYSTEM_SERVO = 102,
829    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
830    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
831    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
832}
833impl FailureUnit {
834    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
835}
836impl Default for FailureUnit {
837    fn default() -> Self {
838        Self::DEFAULT
839    }
840}
841#[cfg_attr(feature = "ts", derive(TS))]
842#[cfg_attr(feature = "ts", ts(export))]
843#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
844#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
845#[cfg_attr(feature = "serde", serde(tag = "type"))]
846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
847#[repr(u32)]
848pub enum FenceBreach {
849    #[doc = "No last fence breach"]
850    FENCE_BREACH_NONE = 0,
851    #[doc = "Breached minimum altitude"]
852    FENCE_BREACH_MINALT = 1,
853    #[doc = "Breached maximum altitude"]
854    FENCE_BREACH_MAXALT = 2,
855    #[doc = "Breached fence boundary"]
856    FENCE_BREACH_BOUNDARY = 3,
857}
858impl FenceBreach {
859    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
860}
861impl Default for FenceBreach {
862    fn default() -> Self {
863        Self::DEFAULT
864    }
865}
866#[cfg_attr(feature = "ts", derive(TS))]
867#[cfg_attr(feature = "ts", ts(export))]
868#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
869#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
870#[cfg_attr(feature = "serde", serde(tag = "type"))]
871#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
872#[repr(u32)]
873#[doc = "Actions being taken to mitigate/prevent fence breach"]
874pub enum FenceMitigate {
875    #[doc = "Unknown"]
876    FENCE_MITIGATE_UNKNOWN = 0,
877    #[doc = "No actions being taken"]
878    FENCE_MITIGATE_NONE = 1,
879    #[doc = "Velocity limiting active to prevent breach"]
880    FENCE_MITIGATE_VEL_LIMIT = 2,
881}
882impl FenceMitigate {
883    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
884}
885impl Default for FenceMitigate {
886    fn default() -> Self {
887        Self::DEFAULT
888    }
889}
890#[cfg_attr(feature = "ts", derive(TS))]
891#[cfg_attr(feature = "ts", ts(export))]
892#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
893#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
894#[cfg_attr(feature = "serde", serde(tag = "type"))]
895#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
896#[repr(u32)]
897#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
898pub enum FenceType {
899    #[doc = "Maximum altitude fence"]
900    FENCE_TYPE_ALT_MAX = 1,
901    #[doc = "Circle fence"]
902    FENCE_TYPE_CIRCLE = 2,
903    #[doc = "Polygon fence"]
904    FENCE_TYPE_POLYGON = 4,
905    #[doc = "Minimum altitude fence"]
906    FENCE_TYPE_ALT_MIN = 8,
907}
908impl FenceType {
909    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
910}
911impl Default for FenceType {
912    fn default() -> Self {
913        Self::DEFAULT
914    }
915}
916#[cfg_attr(feature = "ts", derive(TS))]
917#[cfg_attr(feature = "ts", ts(export))]
918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
920#[cfg_attr(feature = "serde", serde(tag = "type"))]
921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
922#[repr(u32)]
923#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
924pub enum FirmwareVersionType {
925    #[doc = "development release"]
926    FIRMWARE_VERSION_TYPE_DEV = 0,
927    #[doc = "alpha release"]
928    FIRMWARE_VERSION_TYPE_ALPHA = 64,
929    #[doc = "beta release"]
930    FIRMWARE_VERSION_TYPE_BETA = 128,
931    #[doc = "release candidate"]
932    FIRMWARE_VERSION_TYPE_RC = 192,
933    #[doc = "official stable release"]
934    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
935}
936impl FirmwareVersionType {
937    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
938}
939impl Default for FirmwareVersionType {
940    fn default() -> Self {
941        Self::DEFAULT
942    }
943}
944bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
945impl GimbalDeviceCapFlags {
946    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
947}
948impl Default for GimbalDeviceCapFlags {
949    fn default() -> Self {
950        Self::DEFAULT
951    }
952}
953bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
954impl GimbalDeviceErrorFlags {
955    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
956}
957impl Default for GimbalDeviceErrorFlags {
958    fn default() -> Self {
959        Self::DEFAULT
960    }
961}
962bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
963impl GimbalDeviceFlags {
964    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
965}
966impl Default for GimbalDeviceFlags {
967    fn default() -> Self {
968        Self::DEFAULT
969    }
970}
971bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
972impl GimbalManagerCapFlags {
973    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
974}
975impl Default for GimbalManagerCapFlags {
976    fn default() -> Self {
977        Self::DEFAULT
978    }
979}
980bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
981impl GimbalManagerFlags {
982    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
983}
984impl Default for GimbalManagerFlags {
985    fn default() -> Self {
986        Self::DEFAULT
987    }
988}
989#[cfg_attr(feature = "ts", derive(TS))]
990#[cfg_attr(feature = "ts", ts(export))]
991#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
993#[cfg_attr(feature = "serde", serde(tag = "type"))]
994#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
995#[repr(u32)]
996#[doc = "Type of GPS fix"]
997pub enum GpsFixType {
998    #[doc = "No GPS connected"]
999    GPS_FIX_TYPE_NO_GPS = 0,
1000    #[doc = "No position information, GPS is connected"]
1001    GPS_FIX_TYPE_NO_FIX = 1,
1002    #[doc = "2D position"]
1003    GPS_FIX_TYPE_2D_FIX = 2,
1004    #[doc = "3D position"]
1005    GPS_FIX_TYPE_3D_FIX = 3,
1006    #[doc = "DGPS/SBAS aided 3D position"]
1007    GPS_FIX_TYPE_DGPS = 4,
1008    #[doc = "RTK float, 3D position"]
1009    GPS_FIX_TYPE_RTK_FLOAT = 5,
1010    #[doc = "RTK Fixed, 3D position"]
1011    GPS_FIX_TYPE_RTK_FIXED = 6,
1012    #[doc = "Static fixed, typically used for base stations"]
1013    GPS_FIX_TYPE_STATIC = 7,
1014    #[doc = "PPP, 3D position."]
1015    GPS_FIX_TYPE_PPP = 8,
1016}
1017impl GpsFixType {
1018    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1019}
1020impl Default for GpsFixType {
1021    fn default() -> Self {
1022        Self::DEFAULT
1023    }
1024}
1025bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1026impl GpsInputIgnoreFlags {
1027    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1028}
1029impl Default for GpsInputIgnoreFlags {
1030    fn default() -> Self {
1031        Self::DEFAULT
1032    }
1033}
1034#[cfg_attr(feature = "ts", derive(TS))]
1035#[cfg_attr(feature = "ts", ts(export))]
1036#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1038#[cfg_attr(feature = "serde", serde(tag = "type"))]
1039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1040#[repr(u32)]
1041#[doc = "Gripper actions."]
1042pub enum GripperActions {
1043    #[doc = "Gripper release cargo."]
1044    GRIPPER_ACTION_RELEASE = 0,
1045    #[doc = "Gripper grab onto cargo."]
1046    GRIPPER_ACTION_GRAB = 1,
1047}
1048impl GripperActions {
1049    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1050}
1051impl Default for GripperActions {
1052    fn default() -> Self {
1053        Self::DEFAULT
1054    }
1055}
1056bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1057impl HighresImuUpdatedFlags {
1058    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1059}
1060impl Default for HighresImuUpdatedFlags {
1061    fn default() -> Self {
1062        Self::DEFAULT
1063    }
1064}
1065bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1066impl HilActuatorControlsFlags {
1067    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1068}
1069impl Default for HilActuatorControlsFlags {
1070    fn default() -> Self {
1071        Self::DEFAULT
1072    }
1073}
1074bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1075impl HilSensorUpdatedFlags {
1076    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1077}
1078impl Default for HilSensorUpdatedFlags {
1079    fn default() -> Self {
1080        Self::DEFAULT
1081    }
1082}
1083bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1084impl HlFailureFlag {
1085    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1086}
1087impl Default for HlFailureFlag {
1088    fn default() -> Self {
1089        Self::DEFAULT
1090    }
1091}
1092bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1093impl IlluminatorErrorFlags {
1094    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1095}
1096impl Default for IlluminatorErrorFlags {
1097    fn default() -> Self {
1098        Self::DEFAULT
1099    }
1100}
1101#[cfg_attr(feature = "ts", derive(TS))]
1102#[cfg_attr(feature = "ts", ts(export))]
1103#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1104#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1105#[cfg_attr(feature = "serde", serde(tag = "type"))]
1106#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1107#[repr(u32)]
1108#[doc = "Modes of illuminator"]
1109pub enum IlluminatorMode {
1110    #[doc = "Illuminator mode is not specified/unknown"]
1111    ILLUMINATOR_MODE_UNKNOWN = 0,
1112    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1113    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1114    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1115    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1116}
1117impl IlluminatorMode {
1118    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1119}
1120impl Default for IlluminatorMode {
1121    fn default() -> Self {
1122        Self::DEFAULT
1123    }
1124}
1125#[cfg_attr(feature = "ts", derive(TS))]
1126#[cfg_attr(feature = "ts", ts(export))]
1127#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1129#[cfg_attr(feature = "serde", serde(tag = "type"))]
1130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1131#[repr(u32)]
1132#[doc = "Type of landing target"]
1133pub enum LandingTargetType {
1134    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1135    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1136    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1137    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1138    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1139    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1140    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1141    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1142}
1143impl LandingTargetType {
1144    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1145}
1146impl Default for LandingTargetType {
1147    fn default() -> Self {
1148        Self::DEFAULT
1149    }
1150}
1151#[cfg_attr(feature = "ts", derive(TS))]
1152#[cfg_attr(feature = "ts", ts(export))]
1153#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1155#[cfg_attr(feature = "serde", serde(tag = "type"))]
1156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1157#[repr(u32)]
1158pub enum MagCalStatus {
1159    MAG_CAL_NOT_STARTED = 0,
1160    MAG_CAL_WAITING_TO_START = 1,
1161    MAG_CAL_RUNNING_STEP_ONE = 2,
1162    MAG_CAL_RUNNING_STEP_TWO = 3,
1163    MAG_CAL_SUCCESS = 4,
1164    MAG_CAL_FAILED = 5,
1165    MAG_CAL_BAD_ORIENTATION = 6,
1166    MAG_CAL_BAD_RADIUS = 7,
1167}
1168impl MagCalStatus {
1169    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1170}
1171impl Default for MagCalStatus {
1172    fn default() -> Self {
1173        Self::DEFAULT
1174    }
1175}
1176#[cfg_attr(feature = "ts", derive(TS))]
1177#[cfg_attr(feature = "ts", ts(export))]
1178#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1180#[cfg_attr(feature = "serde", serde(tag = "type"))]
1181#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1182#[repr(u32)]
1183pub enum MavArmAuthDeniedReason {
1184    #[doc = "Not a specific reason"]
1185    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1186    #[doc = "Authorizer will send the error as string to GCS"]
1187    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1188    #[doc = "At least one waypoint have a invalid value"]
1189    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1190    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1191    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1192    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1193    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1194    #[doc = "Weather is not good to fly"]
1195    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1196}
1197impl MavArmAuthDeniedReason {
1198    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1199}
1200impl Default for MavArmAuthDeniedReason {
1201    fn default() -> Self {
1202        Self::DEFAULT
1203    }
1204}
1205#[cfg_attr(feature = "ts", derive(TS))]
1206#[cfg_attr(feature = "ts", ts(export))]
1207#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1208#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1209#[cfg_attr(feature = "serde", serde(tag = "type"))]
1210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1211#[repr(u32)]
1212#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1213pub enum MavAutopilot {
1214    #[doc = "Generic autopilot, full support for everything"]
1215    MAV_AUTOPILOT_GENERIC = 0,
1216    #[doc = "Reserved for future use."]
1217    MAV_AUTOPILOT_RESERVED = 1,
1218    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1219    MAV_AUTOPILOT_SLUGS = 2,
1220    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1221    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1222    #[doc = "OpenPilot, <http://openpilot.org>"]
1223    MAV_AUTOPILOT_OPENPILOT = 4,
1224    #[doc = "Generic autopilot only supporting simple waypoints"]
1225    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1226    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1227    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1228    #[doc = "Generic autopilot supporting the full mission command set"]
1229    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1230    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1231    MAV_AUTOPILOT_INVALID = 8,
1232    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1233    MAV_AUTOPILOT_PPZ = 9,
1234    #[doc = "UAV Dev Board"]
1235    MAV_AUTOPILOT_UDB = 10,
1236    #[doc = "FlexiPilot"]
1237    MAV_AUTOPILOT_FP = 11,
1238    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1239    MAV_AUTOPILOT_PX4 = 12,
1240    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1241    MAV_AUTOPILOT_SMACCMPILOT = 13,
1242    #[doc = "AutoQuad -- <http://autoquad.org>"]
1243    MAV_AUTOPILOT_AUTOQUAD = 14,
1244    #[doc = "Armazila -- <http://armazila.com>"]
1245    MAV_AUTOPILOT_ARMAZILA = 15,
1246    #[doc = "Aerob -- <http://aerob.ru>"]
1247    MAV_AUTOPILOT_AEROB = 16,
1248    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1249    MAV_AUTOPILOT_ASLUAV = 17,
1250    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1251    MAV_AUTOPILOT_SMARTAP = 18,
1252    #[doc = "AirRails - <http://uaventure.com>"]
1253    MAV_AUTOPILOT_AIRRAILS = 19,
1254    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1255    MAV_AUTOPILOT_REFLEX = 20,
1256}
1257impl MavAutopilot {
1258    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1259}
1260impl Default for MavAutopilot {
1261    fn default() -> Self {
1262        Self::DEFAULT
1263    }
1264}
1265#[cfg_attr(feature = "ts", derive(TS))]
1266#[cfg_attr(feature = "ts", ts(export))]
1267#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1268#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1269#[cfg_attr(feature = "serde", serde(tag = "type"))]
1270#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1271#[repr(u32)]
1272#[doc = "Enumeration for battery charge states."]
1273pub enum MavBatteryChargeState {
1274    #[doc = "Low battery state is not provided"]
1275    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1276    #[doc = "Battery is not in low state. Normal operation."]
1277    MAV_BATTERY_CHARGE_STATE_OK = 1,
1278    #[doc = "Battery state is low, warn and monitor close."]
1279    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1280    #[doc = "Battery state is critical, return or abort immediately."]
1281    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1282    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1283    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1284    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1285    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1286    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1287    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1288    #[doc = "Battery is charging."]
1289    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1290}
1291impl MavBatteryChargeState {
1292    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1293}
1294impl Default for MavBatteryChargeState {
1295    fn default() -> Self {
1296        Self::DEFAULT
1297    }
1298}
1299bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1300impl MavBatteryFault {
1301    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1302}
1303impl Default for MavBatteryFault {
1304    fn default() -> Self {
1305        Self::DEFAULT
1306    }
1307}
1308#[cfg_attr(feature = "ts", derive(TS))]
1309#[cfg_attr(feature = "ts", ts(export))]
1310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1312#[cfg_attr(feature = "serde", serde(tag = "type"))]
1313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1314#[repr(u32)]
1315#[doc = "Enumeration of battery functions"]
1316pub enum MavBatteryFunction {
1317    #[doc = "Battery function is unknown"]
1318    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1319    #[doc = "Battery supports all flight systems"]
1320    MAV_BATTERY_FUNCTION_ALL = 1,
1321    #[doc = "Battery for the propulsion system"]
1322    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1323    #[doc = "Avionics battery"]
1324    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1325    #[doc = "Payload battery"]
1326    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1327}
1328impl MavBatteryFunction {
1329    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1330}
1331impl Default for MavBatteryFunction {
1332    fn default() -> Self {
1333        Self::DEFAULT
1334    }
1335}
1336#[cfg_attr(feature = "ts", derive(TS))]
1337#[cfg_attr(feature = "ts", ts(export))]
1338#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1340#[cfg_attr(feature = "serde", serde(tag = "type"))]
1341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1342#[repr(u32)]
1343#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1344pub enum MavBatteryMode {
1345    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1346    MAV_BATTERY_MODE_UNKNOWN = 0,
1347    #[doc = "Battery is auto discharging (towards storage level)."]
1348    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1349    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1350    MAV_BATTERY_MODE_HOT_SWAP = 2,
1351}
1352impl MavBatteryMode {
1353    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1354}
1355impl Default for MavBatteryMode {
1356    fn default() -> Self {
1357        Self::DEFAULT
1358    }
1359}
1360#[cfg_attr(feature = "ts", derive(TS))]
1361#[cfg_attr(feature = "ts", ts(export))]
1362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1364#[cfg_attr(feature = "serde", serde(tag = "type"))]
1365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1366#[repr(u32)]
1367#[doc = "Enumeration of battery types"]
1368pub enum MavBatteryType {
1369    #[doc = "Not specified."]
1370    MAV_BATTERY_TYPE_UNKNOWN = 0,
1371    #[doc = "Lithium polymer battery"]
1372    MAV_BATTERY_TYPE_LIPO = 1,
1373    #[doc = "Lithium-iron-phosphate battery"]
1374    MAV_BATTERY_TYPE_LIFE = 2,
1375    #[doc = "Lithium-ION battery"]
1376    MAV_BATTERY_TYPE_LION = 3,
1377    #[doc = "Nickel metal hydride battery"]
1378    MAV_BATTERY_TYPE_NIMH = 4,
1379}
1380impl MavBatteryType {
1381    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1382}
1383impl Default for MavBatteryType {
1384    fn default() -> Self {
1385        Self::DEFAULT
1386    }
1387}
1388#[cfg_attr(feature = "ts", derive(TS))]
1389#[cfg_attr(feature = "ts", ts(export))]
1390#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1392#[cfg_attr(feature = "serde", serde(tag = "type"))]
1393#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1394#[repr(u32)]
1395#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1396pub enum MavCmd {
1397    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1398    MAV_CMD_NAV_WAYPOINT = 16,
1399    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1400    MAV_CMD_NAV_LOITER_UNLIM = 17,
1401    #[doc = "Loiter around this waypoint for X turns"]
1402    MAV_CMD_NAV_LOITER_TURNS = 18,
1403    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1404    MAV_CMD_NAV_LOITER_TIME = 19,
1405    #[doc = "Return to launch location"]
1406    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1407    #[doc = "Land at location."]
1408    MAV_CMD_NAV_LAND = 21,
1409    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1410    MAV_CMD_NAV_TAKEOFF = 22,
1411    #[doc = "Land at local position (local frame only)"]
1412    MAV_CMD_NAV_LAND_LOCAL = 23,
1413    #[doc = "Takeoff from local position (local frame only)"]
1414    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1415    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1416    MAV_CMD_NAV_FOLLOW = 25,
1417    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1418    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1419    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1420    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1421    #[doc = "Begin following a target"]
1422    MAV_CMD_DO_FOLLOW = 32,
1423    #[doc = "Reposition the MAV after a follow target command has been sent"]
1424    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1425    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1426    MAV_CMD_DO_ORBIT = 34,
1427    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1428    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1429    MAV_CMD_NAV_ROI = 80,
1430    #[doc = "Control autonomous path planning on the MAV."]
1431    MAV_CMD_NAV_PATHPLANNING = 81,
1432    #[doc = "Navigate to waypoint using a spline path."]
1433    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1434    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1435    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1436    #[doc = "Land using VTOL mode"]
1437    MAV_CMD_NAV_VTOL_LAND = 85,
1438    #[doc = "hand control over to an external controller"]
1439    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1440    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1441    MAV_CMD_NAV_DELAY = 93,
1442    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1443    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1444    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1445    MAV_CMD_NAV_LAST = 95,
1446    #[doc = "Delay mission state machine."]
1447    MAV_CMD_CONDITION_DELAY = 112,
1448    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1449    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1450    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1451    MAV_CMD_CONDITION_DISTANCE = 114,
1452    #[doc = "Reach a certain target angle."]
1453    MAV_CMD_CONDITION_YAW = 115,
1454    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1455    MAV_CMD_CONDITION_LAST = 159,
1456    #[doc = "Set system mode."]
1457    MAV_CMD_DO_SET_MODE = 176,
1458    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1459    MAV_CMD_DO_JUMP = 177,
1460    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1461    MAV_CMD_DO_CHANGE_SPEED = 178,
1462    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1463    MAV_CMD_DO_SET_HOME = 179,
1464    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1465    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1466    MAV_CMD_DO_SET_PARAMETER = 180,
1467    #[doc = "Set a relay to a condition."]
1468    MAV_CMD_DO_SET_RELAY = 181,
1469    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1470    MAV_CMD_DO_REPEAT_RELAY = 182,
1471    #[doc = "Set a servo to a desired PWM value."]
1472    MAV_CMD_DO_SET_SERVO = 183,
1473    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1474    MAV_CMD_DO_REPEAT_SERVO = 184,
1475    #[doc = "Terminate flight immediately.           Flight termination immediately and irreversibly terminates the current flight, returning the vehicle to ground.           The vehicle will ignore RC or other input until it has been power-cycled.           Termination may trigger safety measures, including: disabling motors and deployment of parachute on multicopters, and setting flight surfaces to initiate a landing pattern on fixed-wing).           On multicopters without a parachute it may trigger a crash landing.           Support for this command can be tested using the protocol bit: MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION.           Support for this command can also be tested by sending the command with param1=0 (&lt;0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1476    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1477    #[doc = "Change altitude set point."]
1478    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1479    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1480    MAV_CMD_DO_SET_ACTUATOR = 187,
1481    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1482    MAV_CMD_DO_RETURN_PATH_START = 188,
1483    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1484    MAV_CMD_DO_LAND_START = 189,
1485    #[doc = "Mission command to perform a landing from a rally point."]
1486    MAV_CMD_DO_RALLY_LAND = 190,
1487    #[doc = "Mission command to safely abort an autonomous landing."]
1488    MAV_CMD_DO_GO_AROUND = 191,
1489    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1490    MAV_CMD_DO_REPOSITION = 192,
1491    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1492    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1493    #[doc = "Set moving direction to forward or reverse."]
1494    MAV_CMD_DO_SET_REVERSE = 194,
1495    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1496    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1497    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1498    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1499    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1500    MAV_CMD_DO_SET_ROI_NONE = 197,
1501    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1502    MAV_CMD_DO_SET_ROI_SYSID = 198,
1503    #[doc = "Control onboard camera system."]
1504    MAV_CMD_DO_CONTROL_VIDEO = 200,
1505    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1506    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1507    MAV_CMD_DO_SET_ROI = 201,
1508    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1509    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1510    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1511    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1512    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1513    #[doc = "Mission command to configure a camera or antenna mount"]
1514    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1515    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1516    #[doc = "Mission command to control a camera or antenna mount"]
1517    MAV_CMD_DO_MOUNT_CONTROL = 205,
1518    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1519    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1520    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1521    MAV_CMD_DO_FENCE_ENABLE = 207,
1522    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1523    MAV_CMD_DO_PARACHUTE = 208,
1524    #[doc = "Command to perform motor test."]
1525    MAV_CMD_DO_MOTOR_TEST = 209,
1526    #[doc = "Change to/from inverted flight."]
1527    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1528    #[doc = "Mission command to operate a gripper."]
1529    MAV_CMD_DO_GRIPPER = 211,
1530    #[doc = "Enable/disable autotune."]
1531    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1532    #[doc = "Sets a desired vehicle turn angle and speed change."]
1533    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1534    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1535    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1536    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1537    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1538    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1539    #[doc = "set id of master controller"]
1540    MAV_CMD_DO_GUIDED_MASTER = 221,
1541    #[doc = "Set limits for external control"]
1542    MAV_CMD_DO_GUIDED_LIMITS = 222,
1543    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1544    MAV_CMD_DO_ENGINE_CONTROL = 223,
1545    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1546    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1547    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1548    MAV_CMD_DO_LAST = 240,
1549    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1550    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1551    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1552    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1553    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1554    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1555    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1556    MAV_CMD_PREFLIGHT_STORAGE = 245,
1557    #[doc = "Request the reboot or shutdown of system components."]
1558    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1559    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1560    MAV_CMD_OVERRIDE_GOTO = 252,
1561    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1562    MAV_CMD_OBLIQUE_SURVEY = 260,
1563    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1564    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1565    #[doc = "start running a mission"]
1566    MAV_CMD_MISSION_START = 300,
1567    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1568    MAV_CMD_ACTUATOR_TEST = 310,
1569    #[doc = "Actuator configuration command."]
1570    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1571    #[doc = "Arms / Disarms a component"]
1572    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1573    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1574    MAV_CMD_RUN_PREARM_CHECKS = 401,
1575    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1576    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1577    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1578    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1579    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1580    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1581    MAV_CMD_GET_HOME_POSITION = 410,
1582    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1583    MAV_CMD_INJECT_FAILURE = 420,
1584    #[doc = "Starts receiver pairing."]
1585    MAV_CMD_START_RX_PAIR = 500,
1586    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1587    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1588    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1589    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1590    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1591    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1592    MAV_CMD_REQUEST_MESSAGE = 512,
1593    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1594    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1595    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1596    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1597    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1598    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1599    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1600    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1601    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1602    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1603    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1604    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1605    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1606    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1607    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1608    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1609    MAV_CMD_STORAGE_FORMAT = 526,
1610    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1611    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1612    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1613    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1614    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1615    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1616    #[doc = "Reset all camera settings to Factory Default"]
1617    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1618    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1619    MAV_CMD_SET_CAMERA_MODE = 530,
1620    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1621    MAV_CMD_SET_CAMERA_ZOOM = 531,
1622    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1623    MAV_CMD_SET_CAMERA_FOCUS = 532,
1624    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1625    MAV_CMD_SET_STORAGE_USAGE = 533,
1626    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1627    MAV_CMD_SET_CAMERA_SOURCE = 534,
1628    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1629    MAV_CMD_JUMP_TAG = 600,
1630    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1631    MAV_CMD_DO_JUMP_TAG = 601,
1632    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1633    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1634    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1635    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1636    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1637    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1638    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1639    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1640    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1641    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1642    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1643    #[doc = "Enable or disable on-board camera triggering system."]
1644    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1645    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1646    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1647    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1648    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1649    #[doc = "Stops ongoing tracking."]
1650    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1651    #[doc = "Starts video capture (recording)."]
1652    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1653    #[doc = "Stop the current video capture (recording)."]
1654    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1655    #[doc = "Start video streaming"]
1656    MAV_CMD_VIDEO_START_STREAMING = 2502,
1657    #[doc = "Stop the given video stream"]
1658    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1659    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1660    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1661    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1662    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1663    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1664    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1665    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1666    MAV_CMD_LOGGING_START = 2510,
1667    #[doc = "Request to stop streaming log data over MAVLink"]
1668    MAV_CMD_LOGGING_STOP = 2511,
1669    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1670    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1671    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1672    #[doc = "Create a panorama at the current position"]
1673    MAV_CMD_PANORAMA_CREATE = 2800,
1674    #[doc = "Request VTOL transition"]
1675    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1676    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1677    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1678    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1679    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1680    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1681    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1682    #[doc = "Delay mission state machine until gate has been reached."]
1683    MAV_CMD_CONDITION_GATE = 4501,
1684    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1685    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1686    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1687    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1688    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1689    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1690    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1691    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1692    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1693    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1694    #[doc = "Rally point. You can have multiple rally points defined."]
1695    MAV_CMD_NAV_RALLY_POINT = 5100,
1696    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1697    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1698    #[doc = "Change state of safety switch."]
1699    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1700    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1701    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1702    #[deprecated = "  (Deprecated since 2021-06)"]
1703    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1704    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1705    #[deprecated = "  (Deprecated since 2021-06)"]
1706    #[doc = "Control the payload deployment."]
1707    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1708    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1709    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1710    #[doc = "Command to operate winch."]
1711    MAV_CMD_DO_WINCH = 42600,
1712    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1713    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1714    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1715    MAV_CMD_WAYPOINT_USER_1 = 31000,
1716    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1717    MAV_CMD_WAYPOINT_USER_2 = 31001,
1718    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1719    MAV_CMD_WAYPOINT_USER_3 = 31002,
1720    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1721    MAV_CMD_WAYPOINT_USER_4 = 31003,
1722    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1723    MAV_CMD_WAYPOINT_USER_5 = 31004,
1724    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1725    MAV_CMD_SPATIAL_USER_1 = 31005,
1726    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1727    MAV_CMD_SPATIAL_USER_2 = 31006,
1728    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1729    MAV_CMD_SPATIAL_USER_3 = 31007,
1730    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1731    MAV_CMD_SPATIAL_USER_4 = 31008,
1732    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1733    MAV_CMD_SPATIAL_USER_5 = 31009,
1734    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1735    MAV_CMD_USER_1 = 31010,
1736    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1737    MAV_CMD_USER_2 = 31011,
1738    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1739    MAV_CMD_USER_3 = 31012,
1740    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1741    MAV_CMD_USER_4 = 31013,
1742    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1743    MAV_CMD_USER_5 = 31014,
1744    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1745    MAV_CMD_CAN_FORWARD = 32000,
1746}
1747impl MavCmd {
1748    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1749}
1750impl Default for MavCmd {
1751    fn default() -> Self {
1752        Self::DEFAULT
1753    }
1754}
1755#[cfg_attr(feature = "ts", derive(TS))]
1756#[cfg_attr(feature = "ts", ts(export))]
1757#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1758#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1759#[cfg_attr(feature = "serde", serde(tag = "type"))]
1760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1761#[repr(u32)]
1762#[doc = "Possible actions an aircraft can take to avoid a collision."]
1763pub enum MavCollisionAction {
1764    #[doc = "Ignore any potential collisions"]
1765    MAV_COLLISION_ACTION_NONE = 0,
1766    #[doc = "Report potential collision"]
1767    MAV_COLLISION_ACTION_REPORT = 1,
1768    #[doc = "Ascend or Descend to avoid threat"]
1769    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1770    #[doc = "Move horizontally to avoid threat"]
1771    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1772    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1773    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1774    #[doc = "Aircraft to fly directly back to its launch point"]
1775    MAV_COLLISION_ACTION_RTL = 5,
1776    #[doc = "Aircraft to stop in place"]
1777    MAV_COLLISION_ACTION_HOVER = 6,
1778}
1779impl MavCollisionAction {
1780    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1781}
1782impl Default for MavCollisionAction {
1783    fn default() -> Self {
1784        Self::DEFAULT
1785    }
1786}
1787#[cfg_attr(feature = "ts", derive(TS))]
1788#[cfg_attr(feature = "ts", ts(export))]
1789#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1790#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1791#[cfg_attr(feature = "serde", serde(tag = "type"))]
1792#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1793#[repr(u32)]
1794#[doc = "Source of information about this collision."]
1795pub enum MavCollisionSrc {
1796    #[doc = "ID field references ADSB_VEHICLE packets"]
1797    MAV_COLLISION_SRC_ADSB = 0,
1798    #[doc = "ID field references MAVLink SRC ID"]
1799    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1800}
1801impl MavCollisionSrc {
1802    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1803}
1804impl Default for MavCollisionSrc {
1805    fn default() -> Self {
1806        Self::DEFAULT
1807    }
1808}
1809#[cfg_attr(feature = "ts", derive(TS))]
1810#[cfg_attr(feature = "ts", ts(export))]
1811#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1813#[cfg_attr(feature = "serde", serde(tag = "type"))]
1814#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1815#[repr(u32)]
1816#[doc = "Aircraft-rated danger from this threat."]
1817pub enum MavCollisionThreatLevel {
1818    #[doc = "Not a threat"]
1819    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1820    #[doc = "Craft is mildly concerned about this threat"]
1821    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1822    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1823    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1824}
1825impl MavCollisionThreatLevel {
1826    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1827}
1828impl Default for MavCollisionThreatLevel {
1829    fn default() -> Self {
1830        Self::DEFAULT
1831    }
1832}
1833#[cfg_attr(feature = "ts", derive(TS))]
1834#[cfg_attr(feature = "ts", ts(export))]
1835#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1836#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1837#[cfg_attr(feature = "serde", serde(tag = "type"))]
1838#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1839#[repr(u32)]
1840#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1841pub enum MavComponent {
1842    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1843    MAV_COMP_ID_ALL = 0,
1844    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1845    MAV_COMP_ID_AUTOPILOT1 = 1,
1846    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1847    MAV_COMP_ID_USER1 = 25,
1848    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1849    MAV_COMP_ID_USER2 = 26,
1850    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1851    MAV_COMP_ID_USER3 = 27,
1852    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1853    MAV_COMP_ID_USER4 = 28,
1854    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1855    MAV_COMP_ID_USER5 = 29,
1856    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1857    MAV_COMP_ID_USER6 = 30,
1858    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1859    MAV_COMP_ID_USER7 = 31,
1860    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1861    MAV_COMP_ID_USER8 = 32,
1862    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1863    MAV_COMP_ID_USER9 = 33,
1864    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1865    MAV_COMP_ID_USER10 = 34,
1866    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1867    MAV_COMP_ID_USER11 = 35,
1868    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1869    MAV_COMP_ID_USER12 = 36,
1870    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1871    MAV_COMP_ID_USER13 = 37,
1872    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1873    MAV_COMP_ID_USER14 = 38,
1874    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1875    MAV_COMP_ID_USER15 = 39,
1876    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1877    MAV_COMP_ID_USER16 = 40,
1878    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1879    MAV_COMP_ID_USER17 = 41,
1880    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1881    MAV_COMP_ID_USER18 = 42,
1882    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1883    MAV_COMP_ID_USER19 = 43,
1884    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1885    MAV_COMP_ID_USER20 = 44,
1886    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1887    MAV_COMP_ID_USER21 = 45,
1888    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1889    MAV_COMP_ID_USER22 = 46,
1890    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1891    MAV_COMP_ID_USER23 = 47,
1892    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1893    MAV_COMP_ID_USER24 = 48,
1894    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1895    MAV_COMP_ID_USER25 = 49,
1896    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1897    MAV_COMP_ID_USER26 = 50,
1898    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1899    MAV_COMP_ID_USER27 = 51,
1900    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1901    MAV_COMP_ID_USER28 = 52,
1902    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1903    MAV_COMP_ID_USER29 = 53,
1904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1905    MAV_COMP_ID_USER30 = 54,
1906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1907    MAV_COMP_ID_USER31 = 55,
1908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1909    MAV_COMP_ID_USER32 = 56,
1910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1911    MAV_COMP_ID_USER33 = 57,
1912    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1913    MAV_COMP_ID_USER34 = 58,
1914    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1915    MAV_COMP_ID_USER35 = 59,
1916    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1917    MAV_COMP_ID_USER36 = 60,
1918    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1919    MAV_COMP_ID_USER37 = 61,
1920    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1921    MAV_COMP_ID_USER38 = 62,
1922    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1923    MAV_COMP_ID_USER39 = 63,
1924    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1925    MAV_COMP_ID_USER40 = 64,
1926    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1927    MAV_COMP_ID_USER41 = 65,
1928    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1929    MAV_COMP_ID_USER42 = 66,
1930    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1931    MAV_COMP_ID_USER43 = 67,
1932    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1933    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1934    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1935    MAV_COMP_ID_USER45 = 69,
1936    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1937    MAV_COMP_ID_USER46 = 70,
1938    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1939    MAV_COMP_ID_USER47 = 71,
1940    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1941    MAV_COMP_ID_USER48 = 72,
1942    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1943    MAV_COMP_ID_USER49 = 73,
1944    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1945    MAV_COMP_ID_USER50 = 74,
1946    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1947    MAV_COMP_ID_USER51 = 75,
1948    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1949    MAV_COMP_ID_USER52 = 76,
1950    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1951    MAV_COMP_ID_USER53 = 77,
1952    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1953    MAV_COMP_ID_USER54 = 78,
1954    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1955    MAV_COMP_ID_USER55 = 79,
1956    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1957    MAV_COMP_ID_USER56 = 80,
1958    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1959    MAV_COMP_ID_USER57 = 81,
1960    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1961    MAV_COMP_ID_USER58 = 82,
1962    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1963    MAV_COMP_ID_USER59 = 83,
1964    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1965    MAV_COMP_ID_USER60 = 84,
1966    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1967    MAV_COMP_ID_USER61 = 85,
1968    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1969    MAV_COMP_ID_USER62 = 86,
1970    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1971    MAV_COMP_ID_USER63 = 87,
1972    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1973    MAV_COMP_ID_USER64 = 88,
1974    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1975    MAV_COMP_ID_USER65 = 89,
1976    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1977    MAV_COMP_ID_USER66 = 90,
1978    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1979    MAV_COMP_ID_USER67 = 91,
1980    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1981    MAV_COMP_ID_USER68 = 92,
1982    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1983    MAV_COMP_ID_USER69 = 93,
1984    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1985    MAV_COMP_ID_USER70 = 94,
1986    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1987    MAV_COMP_ID_USER71 = 95,
1988    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1989    MAV_COMP_ID_USER72 = 96,
1990    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1991    MAV_COMP_ID_USER73 = 97,
1992    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1993    MAV_COMP_ID_USER74 = 98,
1994    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1995    MAV_COMP_ID_USER75 = 99,
1996    #[doc = "Camera #1."]
1997    MAV_COMP_ID_CAMERA = 100,
1998    #[doc = "Camera #2."]
1999    MAV_COMP_ID_CAMERA2 = 101,
2000    #[doc = "Camera #3."]
2001    MAV_COMP_ID_CAMERA3 = 102,
2002    #[doc = "Camera #4."]
2003    MAV_COMP_ID_CAMERA4 = 103,
2004    #[doc = "Camera #5."]
2005    MAV_COMP_ID_CAMERA5 = 104,
2006    #[doc = "Camera #6."]
2007    MAV_COMP_ID_CAMERA6 = 105,
2008    #[doc = "Servo #1."]
2009    MAV_COMP_ID_SERVO1 = 140,
2010    #[doc = "Servo #2."]
2011    MAV_COMP_ID_SERVO2 = 141,
2012    #[doc = "Servo #3."]
2013    MAV_COMP_ID_SERVO3 = 142,
2014    #[doc = "Servo #4."]
2015    MAV_COMP_ID_SERVO4 = 143,
2016    #[doc = "Servo #5."]
2017    MAV_COMP_ID_SERVO5 = 144,
2018    #[doc = "Servo #6."]
2019    MAV_COMP_ID_SERVO6 = 145,
2020    #[doc = "Servo #7."]
2021    MAV_COMP_ID_SERVO7 = 146,
2022    #[doc = "Servo #8."]
2023    MAV_COMP_ID_SERVO8 = 147,
2024    #[doc = "Servo #9."]
2025    MAV_COMP_ID_SERVO9 = 148,
2026    #[doc = "Servo #10."]
2027    MAV_COMP_ID_SERVO10 = 149,
2028    #[doc = "Servo #11."]
2029    MAV_COMP_ID_SERVO11 = 150,
2030    #[doc = "Servo #12."]
2031    MAV_COMP_ID_SERVO12 = 151,
2032    #[doc = "Servo #13."]
2033    MAV_COMP_ID_SERVO13 = 152,
2034    #[doc = "Servo #14."]
2035    MAV_COMP_ID_SERVO14 = 153,
2036    #[doc = "Gimbal #1."]
2037    MAV_COMP_ID_GIMBAL = 154,
2038    #[doc = "Logging component."]
2039    MAV_COMP_ID_LOG = 155,
2040    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2041    MAV_COMP_ID_ADSB = 156,
2042    #[doc = "On Screen Display (OSD) devices for video links."]
2043    MAV_COMP_ID_OSD = 157,
2044    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2045    MAV_COMP_ID_PERIPHERAL = 158,
2046    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2047    #[doc = "Gimbal ID for QX1."]
2048    MAV_COMP_ID_QX1_GIMBAL = 159,
2049    #[doc = "FLARM collision alert component."]
2050    MAV_COMP_ID_FLARM = 160,
2051    #[doc = "Parachute component."]
2052    MAV_COMP_ID_PARACHUTE = 161,
2053    #[doc = "Winch component."]
2054    MAV_COMP_ID_WINCH = 169,
2055    #[doc = "Gimbal #2."]
2056    MAV_COMP_ID_GIMBAL2 = 171,
2057    #[doc = "Gimbal #3."]
2058    MAV_COMP_ID_GIMBAL3 = 172,
2059    #[doc = "Gimbal #4"]
2060    MAV_COMP_ID_GIMBAL4 = 173,
2061    #[doc = "Gimbal #5."]
2062    MAV_COMP_ID_GIMBAL5 = 174,
2063    #[doc = "Gimbal #6."]
2064    MAV_COMP_ID_GIMBAL6 = 175,
2065    #[doc = "Battery #1."]
2066    MAV_COMP_ID_BATTERY = 180,
2067    #[doc = "Battery #2."]
2068    MAV_COMP_ID_BATTERY2 = 181,
2069    #[doc = "CAN over MAVLink client."]
2070    MAV_COMP_ID_MAVCAN = 189,
2071    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2072    MAV_COMP_ID_MISSIONPLANNER = 190,
2073    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2074    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2075    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2076    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2077    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2078    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2079    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2080    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2081    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2082    MAV_COMP_ID_PATHPLANNER = 195,
2083    #[doc = "Component that plans a collision free path between two points."]
2084    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2085    #[doc = "Component that provides position estimates using VIO techniques."]
2086    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2087    #[doc = "Component that manages pairing of vehicle and GCS."]
2088    MAV_COMP_ID_PAIRING_MANAGER = 198,
2089    #[doc = "Inertial Measurement Unit (IMU) #1."]
2090    MAV_COMP_ID_IMU = 200,
2091    #[doc = "Inertial Measurement Unit (IMU) #2."]
2092    MAV_COMP_ID_IMU_2 = 201,
2093    #[doc = "Inertial Measurement Unit (IMU) #3."]
2094    MAV_COMP_ID_IMU_3 = 202,
2095    #[doc = "GPS #1."]
2096    MAV_COMP_ID_GPS = 220,
2097    #[doc = "GPS #2."]
2098    MAV_COMP_ID_GPS2 = 221,
2099    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2100    MAV_COMP_ID_ODID_TXRX_1 = 236,
2101    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2102    MAV_COMP_ID_ODID_TXRX_2 = 237,
2103    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2104    MAV_COMP_ID_ODID_TXRX_3 = 238,
2105    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2106    MAV_COMP_ID_UDP_BRIDGE = 240,
2107    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2108    MAV_COMP_ID_UART_BRIDGE = 241,
2109    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2110    MAV_COMP_ID_TUNNEL_NODE = 242,
2111    #[doc = "Illuminator"]
2112    MAV_COMP_ID_ILLUMINATOR = 243,
2113    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2114    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2115    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2116}
2117impl MavComponent {
2118    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2119}
2120impl Default for MavComponent {
2121    fn default() -> Self {
2122        Self::DEFAULT
2123    }
2124}
2125#[cfg_attr(feature = "ts", derive(TS))]
2126#[cfg_attr(feature = "ts", ts(export))]
2127#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2129#[cfg_attr(feature = "serde", serde(tag = "type"))]
2130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2131#[repr(u32)]
2132#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2133#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2134pub enum MavDataStream {
2135    #[doc = "Enable all data streams"]
2136    MAV_DATA_STREAM_ALL = 0,
2137    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2138    MAV_DATA_STREAM_RAW_SENSORS = 1,
2139    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2140    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2141    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2142    MAV_DATA_STREAM_RC_CHANNELS = 3,
2143    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2144    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2145    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2146    MAV_DATA_STREAM_POSITION = 6,
2147    #[doc = "Dependent on the autopilot"]
2148    MAV_DATA_STREAM_EXTRA1 = 10,
2149    #[doc = "Dependent on the autopilot"]
2150    MAV_DATA_STREAM_EXTRA2 = 11,
2151    #[doc = "Dependent on the autopilot"]
2152    MAV_DATA_STREAM_EXTRA3 = 12,
2153}
2154impl MavDataStream {
2155    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2156}
2157impl Default for MavDataStream {
2158    fn default() -> Self {
2159        Self::DEFAULT
2160    }
2161}
2162#[cfg_attr(feature = "ts", derive(TS))]
2163#[cfg_attr(feature = "ts", ts(export))]
2164#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2166#[cfg_attr(feature = "serde", serde(tag = "type"))]
2167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2168#[repr(u32)]
2169#[doc = "Enumeration of distance sensor types"]
2170pub enum MavDistanceSensor {
2171    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2172    MAV_DISTANCE_SENSOR_LASER = 0,
2173    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2174    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2175    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2176    MAV_DISTANCE_SENSOR_INFRARED = 2,
2177    #[doc = "Radar type, e.g. uLanding units"]
2178    MAV_DISTANCE_SENSOR_RADAR = 3,
2179    #[doc = "Broken or unknown type, e.g. analog units"]
2180    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2181}
2182impl MavDistanceSensor {
2183    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2184}
2185impl Default for MavDistanceSensor {
2186    fn default() -> Self {
2187        Self::DEFAULT
2188    }
2189}
2190#[cfg_attr(feature = "ts", derive(TS))]
2191#[cfg_attr(feature = "ts", ts(export))]
2192#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2193#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2194#[cfg_attr(feature = "serde", serde(tag = "type"))]
2195#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2196#[repr(u32)]
2197#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2198pub enum MavDoRepositionFlags {
2199    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2200    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2201}
2202impl MavDoRepositionFlags {
2203    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2204}
2205impl Default for MavDoRepositionFlags {
2206    fn default() -> Self {
2207        Self::DEFAULT
2208    }
2209}
2210#[cfg_attr(feature = "ts", derive(TS))]
2211#[cfg_attr(feature = "ts", ts(export))]
2212#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2214#[cfg_attr(feature = "serde", serde(tag = "type"))]
2215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2216#[repr(u32)]
2217#[doc = "Enumeration of estimator types"]
2218pub enum MavEstimatorType {
2219    #[doc = "Unknown type of the estimator."]
2220    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2221    #[doc = "This is a naive estimator without any real covariance feedback."]
2222    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2223    #[doc = "Computer vision based estimate. Might be up to scale."]
2224    MAV_ESTIMATOR_TYPE_VISION = 2,
2225    #[doc = "Visual-inertial estimate."]
2226    MAV_ESTIMATOR_TYPE_VIO = 3,
2227    #[doc = "Plain GPS estimate."]
2228    MAV_ESTIMATOR_TYPE_GPS = 4,
2229    #[doc = "Estimator integrating GPS and inertial sensing."]
2230    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2231    #[doc = "Estimate from external motion capturing system."]
2232    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2233    #[doc = "Estimator based on lidar sensor input."]
2234    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2235    #[doc = "Estimator on autopilot."]
2236    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2237}
2238impl MavEstimatorType {
2239    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2240}
2241impl Default for MavEstimatorType {
2242    fn default() -> Self {
2243        Self::DEFAULT
2244    }
2245}
2246#[cfg_attr(feature = "ts", derive(TS))]
2247#[cfg_attr(feature = "ts", ts(export))]
2248#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2249#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2250#[cfg_attr(feature = "serde", serde(tag = "type"))]
2251#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2252#[repr(u32)]
2253#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2254pub enum MavEventCurrentSequenceFlags {
2255    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2256    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2257}
2258impl MavEventCurrentSequenceFlags {
2259    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2260}
2261impl Default for MavEventCurrentSequenceFlags {
2262    fn default() -> Self {
2263        Self::DEFAULT
2264    }
2265}
2266#[cfg_attr(feature = "ts", derive(TS))]
2267#[cfg_attr(feature = "ts", ts(export))]
2268#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2269#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2270#[cfg_attr(feature = "serde", serde(tag = "type"))]
2271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2272#[repr(u32)]
2273#[doc = "Reason for an event error response."]
2274pub enum MavEventErrorReason {
2275    #[doc = "The requested event is not available (anymore)."]
2276    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2277}
2278impl MavEventErrorReason {
2279    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2280}
2281impl Default for MavEventErrorReason {
2282    fn default() -> Self {
2283        Self::DEFAULT
2284    }
2285}
2286#[cfg_attr(feature = "ts", derive(TS))]
2287#[cfg_attr(feature = "ts", ts(export))]
2288#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2290#[cfg_attr(feature = "serde", serde(tag = "type"))]
2291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2292#[repr(u32)]
2293#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2294pub enum MavFrame {
2295    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2296    MAV_FRAME_GLOBAL = 0,
2297    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2298    MAV_FRAME_LOCAL_NED = 1,
2299    #[doc = "NOT a coordinate frame, indicates a mission command."]
2300    MAV_FRAME_MISSION = 2,
2301    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2302    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2303    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2304    MAV_FRAME_LOCAL_ENU = 4,
2305    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2306    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2307    MAV_FRAME_GLOBAL_INT = 5,
2308    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2309    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2310    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2311    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2312    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2313    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2314    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2315    MAV_FRAME_BODY_NED = 8,
2316    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2317    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2318    MAV_FRAME_BODY_OFFSET_NED = 9,
2319    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2320    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2321    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2322    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2323    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2324    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2325    MAV_FRAME_BODY_FRD = 12,
2326    #[deprecated = "  (Deprecated since 2019-04)"]
2327    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2328    MAV_FRAME_RESERVED_13 = 13,
2329    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2330    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2331    MAV_FRAME_RESERVED_14 = 14,
2332    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2333    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2334    MAV_FRAME_RESERVED_15 = 15,
2335    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2336    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2337    MAV_FRAME_RESERVED_16 = 16,
2338    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2339    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2340    MAV_FRAME_RESERVED_17 = 17,
2341    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2342    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2343    MAV_FRAME_RESERVED_18 = 18,
2344    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2345    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2346    MAV_FRAME_RESERVED_19 = 19,
2347    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2348    MAV_FRAME_LOCAL_FRD = 20,
2349    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2350    MAV_FRAME_LOCAL_FLU = 21,
2351}
2352impl MavFrame {
2353    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2354}
2355impl Default for MavFrame {
2356    fn default() -> Self {
2357        Self::DEFAULT
2358    }
2359}
2360#[cfg_attr(feature = "ts", derive(TS))]
2361#[cfg_attr(feature = "ts", ts(export))]
2362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2364#[cfg_attr(feature = "serde", serde(tag = "type"))]
2365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2366#[repr(u32)]
2367#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2368pub enum MavFtpErr {
2369    #[doc = "None: No error"]
2370    MAV_FTP_ERR_NONE = 0,
2371    #[doc = "Fail: Unknown failure"]
2372    MAV_FTP_ERR_FAIL = 1,
2373    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2374    MAV_FTP_ERR_FAILERRNO = 2,
2375    #[doc = "InvalidDataSize: Payload size is invalid"]
2376    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2377    #[doc = "InvalidSession: Session is not currently open"]
2378    MAV_FTP_ERR_INVALIDSESSION = 4,
2379    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2380    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2381    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2382    MAV_FTP_ERR_EOF = 6,
2383    #[doc = "UnknownCommand: Unknown command / opcode"]
2384    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2385    #[doc = "FileExists: File/directory already exists"]
2386    MAV_FTP_ERR_FILEEXISTS = 8,
2387    #[doc = "FileProtected: File/directory is write protected"]
2388    MAV_FTP_ERR_FILEPROTECTED = 9,
2389    #[doc = "FileNotFound: File/directory not found"]
2390    MAV_FTP_ERR_FILENOTFOUND = 10,
2391}
2392impl MavFtpErr {
2393    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2394}
2395impl Default for MavFtpErr {
2396    fn default() -> Self {
2397        Self::DEFAULT
2398    }
2399}
2400#[cfg_attr(feature = "ts", derive(TS))]
2401#[cfg_attr(feature = "ts", ts(export))]
2402#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2403#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2404#[cfg_attr(feature = "serde", serde(tag = "type"))]
2405#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2406#[repr(u32)]
2407#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2408pub enum MavFtpOpcode {
2409    #[doc = "None. Ignored, always ACKed"]
2410    MAV_FTP_OPCODE_NONE = 0,
2411    #[doc = "TerminateSession: Terminates open Read session"]
2412    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2413    #[doc = "ResetSessions: Terminates all open read sessions"]
2414    MAV_FTP_OPCODE_RESETSESSION = 2,
2415    #[doc = "ListDirectory. List files and directories in path from offset"]
2416    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2417    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2418    MAV_FTP_OPCODE_OPENFILERO = 4,
2419    #[doc = "ReadFile: Reads size bytes from offset in session"]
2420    MAV_FTP_OPCODE_READFILE = 5,
2421    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2422    MAV_FTP_OPCODE_CREATEFILE = 6,
2423    #[doc = "WriteFile: Writes size bytes to offset in session"]
2424    MAV_FTP_OPCODE_WRITEFILE = 7,
2425    #[doc = "RemoveFile: Remove file at path"]
2426    MAV_FTP_OPCODE_REMOVEFILE = 8,
2427    #[doc = "CreateDirectory: Creates directory at path"]
2428    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2429    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2430    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2431    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2432    MAV_FTP_OPCODE_OPENFILEWO = 11,
2433    #[doc = "TruncateFile: Truncate file at path to offset length"]
2434    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2435    #[doc = "Rename: Rename path1 to path2"]
2436    MAV_FTP_OPCODE_RENAME = 13,
2437    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2438    MAV_FTP_OPCODE_CALCFILECRC = 14,
2439    #[doc = "BurstReadFile: Burst download session file"]
2440    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2441    #[doc = "ACK: ACK response"]
2442    MAV_FTP_OPCODE_ACK = 128,
2443    #[doc = "NAK: NAK response"]
2444    MAV_FTP_OPCODE_NAK = 129,
2445}
2446impl MavFtpOpcode {
2447    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2448}
2449impl Default for MavFtpOpcode {
2450    fn default() -> Self {
2451        Self::DEFAULT
2452    }
2453}
2454#[cfg_attr(feature = "ts", derive(TS))]
2455#[cfg_attr(feature = "ts", ts(export))]
2456#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2457#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2458#[cfg_attr(feature = "serde", serde(tag = "type"))]
2459#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2460#[repr(u32)]
2461#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2462pub enum MavFuelType {
2463    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2464    MAV_FUEL_TYPE_UNKNOWN = 0,
2465    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2466    MAV_FUEL_TYPE_LIQUID = 1,
2467    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2468    MAV_FUEL_TYPE_GAS = 2,
2469}
2470impl MavFuelType {
2471    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2472}
2473impl Default for MavFuelType {
2474    fn default() -> Self {
2475        Self::DEFAULT
2476    }
2477}
2478bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2479impl MavGeneratorStatusFlag {
2480    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2481}
2482impl Default for MavGeneratorStatusFlag {
2483    fn default() -> Self {
2484        Self::DEFAULT
2485    }
2486}
2487#[cfg_attr(feature = "ts", derive(TS))]
2488#[cfg_attr(feature = "ts", ts(export))]
2489#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2490#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2491#[cfg_attr(feature = "serde", serde(tag = "type"))]
2492#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2493#[repr(u32)]
2494#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2495pub enum MavGoto {
2496    #[doc = "Hold at the current position."]
2497    MAV_GOTO_DO_HOLD = 0,
2498    #[doc = "Continue with the next item in mission execution."]
2499    MAV_GOTO_DO_CONTINUE = 1,
2500    #[doc = "Hold at the current position of the system"]
2501    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2502    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2503    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2504}
2505impl MavGoto {
2506    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2507}
2508impl Default for MavGoto {
2509    fn default() -> Self {
2510        Self::DEFAULT
2511    }
2512}
2513#[cfg_attr(feature = "ts", derive(TS))]
2514#[cfg_attr(feature = "ts", ts(export))]
2515#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2517#[cfg_attr(feature = "serde", serde(tag = "type"))]
2518#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2519#[repr(u32)]
2520#[doc = "Enumeration of landed detector states"]
2521pub enum MavLandedState {
2522    #[doc = "MAV landed state is unknown"]
2523    MAV_LANDED_STATE_UNDEFINED = 0,
2524    #[doc = "MAV is landed (on ground)"]
2525    MAV_LANDED_STATE_ON_GROUND = 1,
2526    #[doc = "MAV is in air"]
2527    MAV_LANDED_STATE_IN_AIR = 2,
2528    #[doc = "MAV currently taking off"]
2529    MAV_LANDED_STATE_TAKEOFF = 3,
2530    #[doc = "MAV currently landing"]
2531    MAV_LANDED_STATE_LANDING = 4,
2532}
2533impl MavLandedState {
2534    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2535}
2536impl Default for MavLandedState {
2537    fn default() -> Self {
2538        Self::DEFAULT
2539    }
2540}
2541#[cfg_attr(feature = "ts", derive(TS))]
2542#[cfg_attr(feature = "ts", ts(export))]
2543#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2544#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2545#[cfg_attr(feature = "serde", serde(tag = "type"))]
2546#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2547#[repr(u32)]
2548#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2549pub enum MavMissionResult {
2550    #[doc = "mission accepted OK"]
2551    MAV_MISSION_ACCEPTED = 0,
2552    #[doc = "Generic error / not accepting mission commands at all right now."]
2553    MAV_MISSION_ERROR = 1,
2554    #[doc = "Coordinate frame is not supported."]
2555    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2556    #[doc = "Command is not supported."]
2557    MAV_MISSION_UNSUPPORTED = 3,
2558    #[doc = "Mission items exceed storage space."]
2559    MAV_MISSION_NO_SPACE = 4,
2560    #[doc = "One of the parameters has an invalid value."]
2561    MAV_MISSION_INVALID = 5,
2562    #[doc = "param1 has an invalid value."]
2563    MAV_MISSION_INVALID_PARAM1 = 6,
2564    #[doc = "param2 has an invalid value."]
2565    MAV_MISSION_INVALID_PARAM2 = 7,
2566    #[doc = "param3 has an invalid value."]
2567    MAV_MISSION_INVALID_PARAM3 = 8,
2568    #[doc = "param4 has an invalid value."]
2569    MAV_MISSION_INVALID_PARAM4 = 9,
2570    #[doc = "x / param5 has an invalid value."]
2571    MAV_MISSION_INVALID_PARAM5_X = 10,
2572    #[doc = "y / param6 has an invalid value."]
2573    MAV_MISSION_INVALID_PARAM6_Y = 11,
2574    #[doc = "z / param7 has an invalid value."]
2575    MAV_MISSION_INVALID_PARAM7 = 12,
2576    #[doc = "Mission item received out of sequence"]
2577    MAV_MISSION_INVALID_SEQUENCE = 13,
2578    #[doc = "Not accepting any mission commands from this communication partner."]
2579    MAV_MISSION_DENIED = 14,
2580    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2581    MAV_MISSION_OPERATION_CANCELLED = 15,
2582}
2583impl MavMissionResult {
2584    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2585}
2586impl Default for MavMissionResult {
2587    fn default() -> Self {
2588        Self::DEFAULT
2589    }
2590}
2591#[cfg_attr(feature = "ts", derive(TS))]
2592#[cfg_attr(feature = "ts", ts(export))]
2593#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2595#[cfg_attr(feature = "serde", serde(tag = "type"))]
2596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2597#[repr(u32)]
2598#[doc = "Type of mission items being requested/sent in mission protocol."]
2599pub enum MavMissionType {
2600    #[doc = "Items are mission commands for main mission."]
2601    MAV_MISSION_TYPE_MISSION = 0,
2602    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2603    MAV_MISSION_TYPE_FENCE = 1,
2604    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2605    MAV_MISSION_TYPE_RALLY = 2,
2606    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2607    MAV_MISSION_TYPE_ALL = 255,
2608}
2609impl MavMissionType {
2610    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2611}
2612impl Default for MavMissionType {
2613    fn default() -> Self {
2614        Self::DEFAULT
2615    }
2616}
2617#[cfg_attr(feature = "ts", derive(TS))]
2618#[cfg_attr(feature = "ts", ts(export))]
2619#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2620#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2621#[cfg_attr(feature = "serde", serde(tag = "type"))]
2622#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2623#[repr(u32)]
2624#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2625pub enum MavMode {
2626    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2627    MAV_MODE_PREFLIGHT = 0,
2628    #[doc = "System is allowed to be active, under assisted RC control."]
2629    MAV_MODE_STABILIZE_DISARMED = 80,
2630    #[doc = "System is allowed to be active, under assisted RC control."]
2631    MAV_MODE_STABILIZE_ARMED = 208,
2632    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2633    MAV_MODE_MANUAL_DISARMED = 64,
2634    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2635    MAV_MODE_MANUAL_ARMED = 192,
2636    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2637    MAV_MODE_GUIDED_DISARMED = 88,
2638    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2639    MAV_MODE_GUIDED_ARMED = 216,
2640    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2641    MAV_MODE_AUTO_DISARMED = 92,
2642    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2643    MAV_MODE_AUTO_ARMED = 220,
2644    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2645    MAV_MODE_TEST_DISARMED = 66,
2646    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2647    MAV_MODE_TEST_ARMED = 194,
2648}
2649impl MavMode {
2650    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2651}
2652impl Default for MavMode {
2653    fn default() -> Self {
2654        Self::DEFAULT
2655    }
2656}
2657bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2658impl MavModeFlag {
2659    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2660}
2661impl Default for MavModeFlag {
2662    fn default() -> Self {
2663        Self::DEFAULT
2664    }
2665}
2666#[cfg_attr(feature = "ts", derive(TS))]
2667#[cfg_attr(feature = "ts", ts(export))]
2668#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2669#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2670#[cfg_attr(feature = "serde", serde(tag = "type"))]
2671#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2672#[repr(u32)]
2673#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2674pub enum MavModeFlagDecodePosition {
2675    #[doc = "First bit:  10000000"]
2676    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2677    #[doc = "Second bit: 01000000"]
2678    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2679    #[doc = "Third bit:  00100000"]
2680    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2681    #[doc = "Fourth bit: 00010000"]
2682    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2683    #[doc = "Fifth bit:  00001000"]
2684    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2685    #[doc = "Sixth bit:   00000100"]
2686    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2687    #[doc = "Seventh bit: 00000010"]
2688    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2689    #[doc = "Eighth bit: 00000001"]
2690    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2691}
2692impl MavModeFlagDecodePosition {
2693    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2694}
2695impl Default for MavModeFlagDecodePosition {
2696    fn default() -> Self {
2697        Self::DEFAULT
2698    }
2699}
2700bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2701impl MavModeProperty {
2702    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2703}
2704impl Default for MavModeProperty {
2705    fn default() -> Self {
2706        Self::DEFAULT
2707    }
2708}
2709#[cfg_attr(feature = "ts", derive(TS))]
2710#[cfg_attr(feature = "ts", ts(export))]
2711#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2712#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2713#[cfg_attr(feature = "serde", serde(tag = "type"))]
2714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2715#[repr(u32)]
2716#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2717#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2718pub enum MavMountMode {
2719    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2720    MAV_MOUNT_MODE_RETRACT = 0,
2721    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2722    MAV_MOUNT_MODE_NEUTRAL = 1,
2723    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2724    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2725    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2726    MAV_MOUNT_MODE_RC_TARGETING = 3,
2727    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2728    MAV_MOUNT_MODE_GPS_POINT = 4,
2729    #[doc = "Gimbal tracks system with specified system ID"]
2730    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2731    #[doc = "Gimbal tracks home position"]
2732    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2733}
2734impl MavMountMode {
2735    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2736}
2737impl Default for MavMountMode {
2738    fn default() -> Self {
2739        Self::DEFAULT
2740    }
2741}
2742#[cfg_attr(feature = "ts", derive(TS))]
2743#[cfg_attr(feature = "ts", ts(export))]
2744#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2745#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2746#[cfg_attr(feature = "serde", serde(tag = "type"))]
2747#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2748#[repr(u32)]
2749pub enum MavOdidArmStatus {
2750    #[doc = "Passing arming checks."]
2751    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2752    #[doc = "Generic arming failure, see error string for details."]
2753    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2754}
2755impl MavOdidArmStatus {
2756    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2757}
2758impl Default for MavOdidArmStatus {
2759    fn default() -> Self {
2760        Self::DEFAULT
2761    }
2762}
2763#[cfg_attr(feature = "ts", derive(TS))]
2764#[cfg_attr(feature = "ts", ts(export))]
2765#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2766#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2767#[cfg_attr(feature = "serde", serde(tag = "type"))]
2768#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2769#[repr(u32)]
2770pub enum MavOdidAuthType {
2771    #[doc = "No authentication type is specified."]
2772    MAV_ODID_AUTH_TYPE_NONE = 0,
2773    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2774    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2775    #[doc = "Signature for the Operator ID."]
2776    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2777    #[doc = "Signature for the entire message set."]
2778    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2779    #[doc = "Authentication is provided by Network Remote ID."]
2780    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2781    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2782    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2783}
2784impl MavOdidAuthType {
2785    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2786}
2787impl Default for MavOdidAuthType {
2788    fn default() -> Self {
2789        Self::DEFAULT
2790    }
2791}
2792#[cfg_attr(feature = "ts", derive(TS))]
2793#[cfg_attr(feature = "ts", ts(export))]
2794#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2795#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2796#[cfg_attr(feature = "serde", serde(tag = "type"))]
2797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2798#[repr(u32)]
2799pub enum MavOdidCategoryEu {
2800    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2801    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2802    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2803    MAV_ODID_CATEGORY_EU_OPEN = 1,
2804    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2805    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2806    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2807    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2808}
2809impl MavOdidCategoryEu {
2810    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2811}
2812impl Default for MavOdidCategoryEu {
2813    fn default() -> Self {
2814        Self::DEFAULT
2815    }
2816}
2817#[cfg_attr(feature = "ts", derive(TS))]
2818#[cfg_attr(feature = "ts", ts(export))]
2819#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2820#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2821#[cfg_attr(feature = "serde", serde(tag = "type"))]
2822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2823#[repr(u32)]
2824pub enum MavOdidClassEu {
2825    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2826    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2827    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2828    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2829    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2830    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2831    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2832    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2833    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2834    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2835    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2836    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2837    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2838    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2839    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2840    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2841}
2842impl MavOdidClassEu {
2843    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2844}
2845impl Default for MavOdidClassEu {
2846    fn default() -> Self {
2847        Self::DEFAULT
2848    }
2849}
2850#[cfg_attr(feature = "ts", derive(TS))]
2851#[cfg_attr(feature = "ts", ts(export))]
2852#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2853#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2854#[cfg_attr(feature = "serde", serde(tag = "type"))]
2855#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2856#[repr(u32)]
2857pub enum MavOdidClassificationType {
2858    #[doc = "The classification type for the UA is undeclared."]
2859    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2860    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2861    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2862}
2863impl MavOdidClassificationType {
2864    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2865}
2866impl Default for MavOdidClassificationType {
2867    fn default() -> Self {
2868        Self::DEFAULT
2869    }
2870}
2871#[cfg_attr(feature = "ts", derive(TS))]
2872#[cfg_attr(feature = "ts", ts(export))]
2873#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2874#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2875#[cfg_attr(feature = "serde", serde(tag = "type"))]
2876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2877#[repr(u32)]
2878pub enum MavOdidDescType {
2879    #[doc = "Optional free-form text description of the purpose of the flight."]
2880    MAV_ODID_DESC_TYPE_TEXT = 0,
2881    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2882    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2883    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2884    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2885}
2886impl MavOdidDescType {
2887    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2888}
2889impl Default for MavOdidDescType {
2890    fn default() -> Self {
2891        Self::DEFAULT
2892    }
2893}
2894#[cfg_attr(feature = "ts", derive(TS))]
2895#[cfg_attr(feature = "ts", ts(export))]
2896#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2898#[cfg_attr(feature = "serde", serde(tag = "type"))]
2899#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2900#[repr(u32)]
2901pub enum MavOdidHeightRef {
2902    #[doc = "The height field is relative to the take-off location."]
2903    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2904    #[doc = "The height field is relative to ground."]
2905    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2906}
2907impl MavOdidHeightRef {
2908    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2909}
2910impl Default for MavOdidHeightRef {
2911    fn default() -> Self {
2912        Self::DEFAULT
2913    }
2914}
2915#[cfg_attr(feature = "ts", derive(TS))]
2916#[cfg_attr(feature = "ts", ts(export))]
2917#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2918#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2919#[cfg_attr(feature = "serde", serde(tag = "type"))]
2920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2921#[repr(u32)]
2922pub enum MavOdidHorAcc {
2923    #[doc = "The horizontal accuracy is unknown."]
2924    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2925    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2926    MAV_ODID_HOR_ACC_10NM = 1,
2927    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2928    MAV_ODID_HOR_ACC_4NM = 2,
2929    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2930    MAV_ODID_HOR_ACC_2NM = 3,
2931    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2932    MAV_ODID_HOR_ACC_1NM = 4,
2933    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2934    MAV_ODID_HOR_ACC_0_5NM = 5,
2935    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2936    MAV_ODID_HOR_ACC_0_3NM = 6,
2937    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2938    MAV_ODID_HOR_ACC_0_1NM = 7,
2939    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2940    MAV_ODID_HOR_ACC_0_05NM = 8,
2941    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2942    MAV_ODID_HOR_ACC_30_METER = 9,
2943    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2944    MAV_ODID_HOR_ACC_10_METER = 10,
2945    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2946    MAV_ODID_HOR_ACC_3_METER = 11,
2947    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2948    MAV_ODID_HOR_ACC_1_METER = 12,
2949}
2950impl MavOdidHorAcc {
2951    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2952}
2953impl Default for MavOdidHorAcc {
2954    fn default() -> Self {
2955        Self::DEFAULT
2956    }
2957}
2958#[cfg_attr(feature = "ts", derive(TS))]
2959#[cfg_attr(feature = "ts", ts(export))]
2960#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2961#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2962#[cfg_attr(feature = "serde", serde(tag = "type"))]
2963#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2964#[repr(u32)]
2965pub enum MavOdidIdType {
2966    #[doc = "No type defined."]
2967    MAV_ODID_ID_TYPE_NONE = 0,
2968    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2969    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2970    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2971    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2972    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2973    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2974    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2975    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2976}
2977impl MavOdidIdType {
2978    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2979}
2980impl Default for MavOdidIdType {
2981    fn default() -> Self {
2982        Self::DEFAULT
2983    }
2984}
2985#[cfg_attr(feature = "ts", derive(TS))]
2986#[cfg_attr(feature = "ts", ts(export))]
2987#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2988#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2989#[cfg_attr(feature = "serde", serde(tag = "type"))]
2990#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2991#[repr(u32)]
2992pub enum MavOdidOperatorIdType {
2993    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2994    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2995}
2996impl MavOdidOperatorIdType {
2997    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
2998}
2999impl Default for MavOdidOperatorIdType {
3000    fn default() -> Self {
3001        Self::DEFAULT
3002    }
3003}
3004#[cfg_attr(feature = "ts", derive(TS))]
3005#[cfg_attr(feature = "ts", ts(export))]
3006#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3007#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3008#[cfg_attr(feature = "serde", serde(tag = "type"))]
3009#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3010#[repr(u32)]
3011pub enum MavOdidOperatorLocationType {
3012    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3013    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3014    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3015    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3016    #[doc = "The location/altitude of the operator are fixed values."]
3017    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3018}
3019impl MavOdidOperatorLocationType {
3020    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3021}
3022impl Default for MavOdidOperatorLocationType {
3023    fn default() -> Self {
3024        Self::DEFAULT
3025    }
3026}
3027#[cfg_attr(feature = "ts", derive(TS))]
3028#[cfg_attr(feature = "ts", ts(export))]
3029#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3030#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3031#[cfg_attr(feature = "serde", serde(tag = "type"))]
3032#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3033#[repr(u32)]
3034pub enum MavOdidSpeedAcc {
3035    #[doc = "The speed accuracy is unknown."]
3036    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3037    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3038    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3039    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3040    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3041    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3042    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3043    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3044    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3045}
3046impl MavOdidSpeedAcc {
3047    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3048}
3049impl Default for MavOdidSpeedAcc {
3050    fn default() -> Self {
3051        Self::DEFAULT
3052    }
3053}
3054#[cfg_attr(feature = "ts", derive(TS))]
3055#[cfg_attr(feature = "ts", ts(export))]
3056#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3058#[cfg_attr(feature = "serde", serde(tag = "type"))]
3059#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3060#[repr(u32)]
3061pub enum MavOdidStatus {
3062    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3063    MAV_ODID_STATUS_UNDECLARED = 0,
3064    #[doc = "The UA is on the ground."]
3065    MAV_ODID_STATUS_GROUND = 1,
3066    #[doc = "The UA is in the air."]
3067    MAV_ODID_STATUS_AIRBORNE = 2,
3068    #[doc = "The UA is having an emergency."]
3069    MAV_ODID_STATUS_EMERGENCY = 3,
3070    #[doc = "The remote ID system is failing or unreliable in some way."]
3071    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3072}
3073impl MavOdidStatus {
3074    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3075}
3076impl Default for MavOdidStatus {
3077    fn default() -> Self {
3078        Self::DEFAULT
3079    }
3080}
3081#[cfg_attr(feature = "ts", derive(TS))]
3082#[cfg_attr(feature = "ts", ts(export))]
3083#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3085#[cfg_attr(feature = "serde", serde(tag = "type"))]
3086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3087#[repr(u32)]
3088pub enum MavOdidTimeAcc {
3089    #[doc = "The timestamp accuracy is unknown."]
3090    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3091    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3092    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3093    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3094    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3095    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3096    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3097    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3098    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3099    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3100    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3101    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3102    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3103    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3104    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3105    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3106    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3107    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3108    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3109    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3110    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3111    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3112    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3113    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3114    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3115    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3116    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3117    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3118    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3119    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3120    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3121}
3122impl MavOdidTimeAcc {
3123    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3124}
3125impl Default for MavOdidTimeAcc {
3126    fn default() -> Self {
3127        Self::DEFAULT
3128    }
3129}
3130#[cfg_attr(feature = "ts", derive(TS))]
3131#[cfg_attr(feature = "ts", ts(export))]
3132#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3133#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3134#[cfg_attr(feature = "serde", serde(tag = "type"))]
3135#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3136#[repr(u32)]
3137pub enum MavOdidUaType {
3138    #[doc = "No UA (Unmanned Aircraft) type defined."]
3139    MAV_ODID_UA_TYPE_NONE = 0,
3140    #[doc = "Aeroplane/Airplane. Fixed wing."]
3141    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3142    #[doc = "Helicopter or multirotor."]
3143    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3144    #[doc = "Gyroplane."]
3145    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3146    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3147    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3148    #[doc = "Ornithopter."]
3149    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3150    #[doc = "Glider."]
3151    MAV_ODID_UA_TYPE_GLIDER = 6,
3152    #[doc = "Kite."]
3153    MAV_ODID_UA_TYPE_KITE = 7,
3154    #[doc = "Free Balloon."]
3155    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3156    #[doc = "Captive Balloon."]
3157    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3158    #[doc = "Airship. E.g. a blimp."]
3159    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3160    #[doc = "Free Fall/Parachute (unpowered)."]
3161    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3162    #[doc = "Rocket."]
3163    MAV_ODID_UA_TYPE_ROCKET = 12,
3164    #[doc = "Tethered powered aircraft."]
3165    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3166    #[doc = "Ground Obstacle."]
3167    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3168    #[doc = "Other type of aircraft not listed earlier."]
3169    MAV_ODID_UA_TYPE_OTHER = 15,
3170}
3171impl MavOdidUaType {
3172    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3173}
3174impl Default for MavOdidUaType {
3175    fn default() -> Self {
3176        Self::DEFAULT
3177    }
3178}
3179#[cfg_attr(feature = "ts", derive(TS))]
3180#[cfg_attr(feature = "ts", ts(export))]
3181#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3182#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3183#[cfg_attr(feature = "serde", serde(tag = "type"))]
3184#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3185#[repr(u32)]
3186pub enum MavOdidVerAcc {
3187    #[doc = "The vertical accuracy is unknown."]
3188    MAV_ODID_VER_ACC_UNKNOWN = 0,
3189    #[doc = "The vertical accuracy is smaller than 150 meter."]
3190    MAV_ODID_VER_ACC_150_METER = 1,
3191    #[doc = "The vertical accuracy is smaller than 45 meter."]
3192    MAV_ODID_VER_ACC_45_METER = 2,
3193    #[doc = "The vertical accuracy is smaller than 25 meter."]
3194    MAV_ODID_VER_ACC_25_METER = 3,
3195    #[doc = "The vertical accuracy is smaller than 10 meter."]
3196    MAV_ODID_VER_ACC_10_METER = 4,
3197    #[doc = "The vertical accuracy is smaller than 3 meter."]
3198    MAV_ODID_VER_ACC_3_METER = 5,
3199    #[doc = "The vertical accuracy is smaller than 1 meter."]
3200    MAV_ODID_VER_ACC_1_METER = 6,
3201}
3202impl MavOdidVerAcc {
3203    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3204}
3205impl Default for MavOdidVerAcc {
3206    fn default() -> Self {
3207        Self::DEFAULT
3208    }
3209}
3210#[cfg_attr(feature = "ts", derive(TS))]
3211#[cfg_attr(feature = "ts", ts(export))]
3212#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3214#[cfg_attr(feature = "serde", serde(tag = "type"))]
3215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3216#[repr(u32)]
3217#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3218pub enum MavParamExtType {
3219    #[doc = "8-bit unsigned integer"]
3220    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3221    #[doc = "8-bit signed integer"]
3222    MAV_PARAM_EXT_TYPE_INT8 = 2,
3223    #[doc = "16-bit unsigned integer"]
3224    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3225    #[doc = "16-bit signed integer"]
3226    MAV_PARAM_EXT_TYPE_INT16 = 4,
3227    #[doc = "32-bit unsigned integer"]
3228    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3229    #[doc = "32-bit signed integer"]
3230    MAV_PARAM_EXT_TYPE_INT32 = 6,
3231    #[doc = "64-bit unsigned integer"]
3232    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3233    #[doc = "64-bit signed integer"]
3234    MAV_PARAM_EXT_TYPE_INT64 = 8,
3235    #[doc = "32-bit floating-point"]
3236    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3237    #[doc = "64-bit floating-point"]
3238    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3239    #[doc = "Custom Type"]
3240    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3241}
3242impl MavParamExtType {
3243    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3244}
3245impl Default for MavParamExtType {
3246    fn default() -> Self {
3247        Self::DEFAULT
3248    }
3249}
3250#[cfg_attr(feature = "ts", derive(TS))]
3251#[cfg_attr(feature = "ts", ts(export))]
3252#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3254#[cfg_attr(feature = "serde", serde(tag = "type"))]
3255#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3256#[repr(u32)]
3257#[doc = "Specifies the datatype of a MAVLink parameter."]
3258pub enum MavParamType {
3259    #[doc = "8-bit unsigned integer"]
3260    MAV_PARAM_TYPE_UINT8 = 1,
3261    #[doc = "8-bit signed integer"]
3262    MAV_PARAM_TYPE_INT8 = 2,
3263    #[doc = "16-bit unsigned integer"]
3264    MAV_PARAM_TYPE_UINT16 = 3,
3265    #[doc = "16-bit signed integer"]
3266    MAV_PARAM_TYPE_INT16 = 4,
3267    #[doc = "32-bit unsigned integer"]
3268    MAV_PARAM_TYPE_UINT32 = 5,
3269    #[doc = "32-bit signed integer"]
3270    MAV_PARAM_TYPE_INT32 = 6,
3271    #[doc = "64-bit unsigned integer"]
3272    MAV_PARAM_TYPE_UINT64 = 7,
3273    #[doc = "64-bit signed integer"]
3274    MAV_PARAM_TYPE_INT64 = 8,
3275    #[doc = "32-bit floating-point"]
3276    MAV_PARAM_TYPE_REAL32 = 9,
3277    #[doc = "64-bit floating-point"]
3278    MAV_PARAM_TYPE_REAL64 = 10,
3279}
3280impl MavParamType {
3281    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3282}
3283impl Default for MavParamType {
3284    fn default() -> Self {
3285        Self::DEFAULT
3286    }
3287}
3288bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3289impl MavPowerStatus {
3290    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3291}
3292impl Default for MavPowerStatus {
3293    fn default() -> Self {
3294        Self::DEFAULT
3295    }
3296}
3297bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3298impl MavProtocolCapability {
3299    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3300}
3301impl Default for MavProtocolCapability {
3302    fn default() -> Self {
3303        Self::DEFAULT
3304    }
3305}
3306#[cfg_attr(feature = "ts", derive(TS))]
3307#[cfg_attr(feature = "ts", ts(export))]
3308#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3309#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3310#[cfg_attr(feature = "serde", serde(tag = "type"))]
3311#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3312#[repr(u32)]
3313#[doc = "Result from a MAVLink command (MAV_CMD)"]
3314pub enum MavResult {
3315    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3316    MAV_RESULT_ACCEPTED = 0,
3317    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3318    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3319    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3320    MAV_RESULT_DENIED = 2,
3321    #[doc = "Command is not supported (unknown)."]
3322    MAV_RESULT_UNSUPPORTED = 3,
3323    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3324    MAV_RESULT_FAILED = 4,
3325    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3326    MAV_RESULT_IN_PROGRESS = 5,
3327    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3328    MAV_RESULT_CANCELLED = 6,
3329    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3330    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3331    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3332    MAV_RESULT_COMMAND_INT_ONLY = 8,
3333    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3334    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3335}
3336impl MavResult {
3337    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3338}
3339impl Default for MavResult {
3340    fn default() -> Self {
3341        Self::DEFAULT
3342    }
3343}
3344#[cfg_attr(feature = "ts", derive(TS))]
3345#[cfg_attr(feature = "ts", ts(export))]
3346#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3347#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3348#[cfg_attr(feature = "serde", serde(tag = "type"))]
3349#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3350#[repr(u32)]
3351#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3352#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3353pub enum MavRoi {
3354    #[doc = "No region of interest."]
3355    MAV_ROI_NONE = 0,
3356    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3357    MAV_ROI_WPNEXT = 1,
3358    #[doc = "Point toward given waypoint."]
3359    MAV_ROI_WPINDEX = 2,
3360    #[doc = "Point toward fixed location."]
3361    MAV_ROI_LOCATION = 3,
3362    #[doc = "Point toward of given id."]
3363    MAV_ROI_TARGET = 4,
3364}
3365impl MavRoi {
3366    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3367}
3368impl Default for MavRoi {
3369    fn default() -> Self {
3370        Self::DEFAULT
3371    }
3372}
3373#[cfg_attr(feature = "ts", derive(TS))]
3374#[cfg_attr(feature = "ts", ts(export))]
3375#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3377#[cfg_attr(feature = "serde", serde(tag = "type"))]
3378#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3379#[repr(u32)]
3380#[doc = "Enumeration of sensor orientation, according to its rotations"]
3381pub enum MavSensorOrientation {
3382    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3383    MAV_SENSOR_ROTATION_NONE = 0,
3384    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3385    MAV_SENSOR_ROTATION_YAW_45 = 1,
3386    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3387    MAV_SENSOR_ROTATION_YAW_90 = 2,
3388    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3389    MAV_SENSOR_ROTATION_YAW_135 = 3,
3390    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3391    MAV_SENSOR_ROTATION_YAW_180 = 4,
3392    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3393    MAV_SENSOR_ROTATION_YAW_225 = 5,
3394    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3395    MAV_SENSOR_ROTATION_YAW_270 = 6,
3396    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3397    MAV_SENSOR_ROTATION_YAW_315 = 7,
3398    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3399    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3400    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3401    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3402    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3403    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3404    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3405    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3406    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3407    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3408    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3409    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3410    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3411    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3412    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3413    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3414    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3415    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3416    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3417    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3418    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3419    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3420    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3421    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3422    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3423    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3424    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3425    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3426    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3427    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3428    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3429    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3430    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3431    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3432    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3433    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3434    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3435    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3436    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3437    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3438    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3439    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3440    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3441    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3442    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3443    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3444    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3445    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3446    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3447    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3448    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3449    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3450    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3451    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3452    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3453    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3454    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3455    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3456    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3457    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3458    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3459    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3460    #[doc = "Pitch: 315"]
3461    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3462    #[doc = "Roll: 90, Pitch: 315"]
3463    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3464    #[doc = "Custom orientation"]
3465    MAV_SENSOR_ROTATION_CUSTOM = 100,
3466}
3467impl MavSensorOrientation {
3468    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3469}
3470impl Default for MavSensorOrientation {
3471    fn default() -> Self {
3472        Self::DEFAULT
3473    }
3474}
3475#[cfg_attr(feature = "ts", derive(TS))]
3476#[cfg_attr(feature = "ts", ts(export))]
3477#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3478#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3479#[cfg_attr(feature = "serde", serde(tag = "type"))]
3480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3481#[repr(u32)]
3482#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3483pub enum MavSeverity {
3484    #[doc = "System is unusable. This is a \"panic\" condition."]
3485    MAV_SEVERITY_EMERGENCY = 0,
3486    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3487    MAV_SEVERITY_ALERT = 1,
3488    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3489    MAV_SEVERITY_CRITICAL = 2,
3490    #[doc = "Indicates an error in secondary/redundant systems."]
3491    MAV_SEVERITY_ERROR = 3,
3492    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3493    MAV_SEVERITY_WARNING = 4,
3494    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3495    MAV_SEVERITY_NOTICE = 5,
3496    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3497    MAV_SEVERITY_INFO = 6,
3498    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3499    MAV_SEVERITY_DEBUG = 7,
3500}
3501impl MavSeverity {
3502    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3503}
3504impl Default for MavSeverity {
3505    fn default() -> Self {
3506        Self::DEFAULT
3507    }
3508}
3509#[cfg_attr(feature = "ts", derive(TS))]
3510#[cfg_attr(feature = "ts", ts(export))]
3511#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3512#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3513#[cfg_attr(feature = "serde", serde(tag = "type"))]
3514#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3515#[repr(u32)]
3516#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3517pub enum MavStandardMode {
3518    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3519    MAV_STANDARD_MODE_NON_STANDARD = 0,
3520    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3521    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3522    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3523    MAV_STANDARD_MODE_ORBIT = 2,
3524    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3525    MAV_STANDARD_MODE_CRUISE = 3,
3526    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3527    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3528    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3529    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3530    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3531    MAV_STANDARD_MODE_MISSION = 6,
3532    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3533    MAV_STANDARD_MODE_LAND = 7,
3534    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3535    MAV_STANDARD_MODE_TAKEOFF = 8,
3536}
3537impl MavStandardMode {
3538    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3539}
3540impl Default for MavStandardMode {
3541    fn default() -> Self {
3542        Self::DEFAULT
3543    }
3544}
3545#[cfg_attr(feature = "ts", derive(TS))]
3546#[cfg_attr(feature = "ts", ts(export))]
3547#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3549#[cfg_attr(feature = "serde", serde(tag = "type"))]
3550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3551#[repr(u32)]
3552pub enum MavState {
3553    #[doc = "Uninitialized system, state is unknown."]
3554    MAV_STATE_UNINIT = 0,
3555    #[doc = "System is booting up."]
3556    MAV_STATE_BOOT = 1,
3557    #[doc = "System is calibrating and not flight-ready."]
3558    MAV_STATE_CALIBRATING = 2,
3559    #[doc = "System is grounded and on standby. It can be launched any time."]
3560    MAV_STATE_STANDBY = 3,
3561    #[doc = "System is active and might be already airborne. Motors are engaged."]
3562    MAV_STATE_ACTIVE = 4,
3563    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3564    MAV_STATE_CRITICAL = 5,
3565    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3566    MAV_STATE_EMERGENCY = 6,
3567    #[doc = "System just initialized its power-down sequence, will shut down now."]
3568    MAV_STATE_POWEROFF = 7,
3569    #[doc = "System is terminating itself (failsafe or commanded)."]
3570    MAV_STATE_FLIGHT_TERMINATION = 8,
3571}
3572impl MavState {
3573    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3574}
3575impl Default for MavState {
3576    fn default() -> Self {
3577        Self::DEFAULT
3578    }
3579}
3580bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3581impl MavSysStatusSensor {
3582    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3583}
3584impl Default for MavSysStatusSensor {
3585    fn default() -> Self {
3586        Self::DEFAULT
3587    }
3588}
3589bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3590impl MavSysStatusSensorExtended {
3591    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3592}
3593impl Default for MavSysStatusSensorExtended {
3594    fn default() -> Self {
3595        Self::DEFAULT
3596    }
3597}
3598#[cfg_attr(feature = "ts", derive(TS))]
3599#[cfg_attr(feature = "ts", ts(export))]
3600#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3601#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3602#[cfg_attr(feature = "serde", serde(tag = "type"))]
3603#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3604#[repr(u32)]
3605pub enum MavTunnelPayloadType {
3606    #[doc = "Encoding of payload unknown."]
3607    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3608    #[doc = "Registered for STorM32 gimbal controller."]
3609    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3610    #[doc = "Registered for STorM32 gimbal controller."]
3611    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3612    #[doc = "Registered for STorM32 gimbal controller."]
3613    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3614    #[doc = "Registered for STorM32 gimbal controller."]
3615    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3616    #[doc = "Registered for STorM32 gimbal controller."]
3617    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3618    #[doc = "Registered for STorM32 gimbal controller."]
3619    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3620    #[doc = "Registered for STorM32 gimbal controller."]
3621    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3622    #[doc = "Registered for STorM32 gimbal controller."]
3623    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3624    #[doc = "Registered for STorM32 gimbal controller."]
3625    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3626    #[doc = "Registered for STorM32 gimbal controller."]
3627    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3628    #[doc = "Registered for ModalAI remote OSD protocol."]
3629    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3630    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3631    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3632    #[doc = "Registered for ModalAI vendor use."]
3633    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3634}
3635impl MavTunnelPayloadType {
3636    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3637}
3638impl Default for MavTunnelPayloadType {
3639    fn default() -> Self {
3640        Self::DEFAULT
3641    }
3642}
3643#[cfg_attr(feature = "ts", derive(TS))]
3644#[cfg_attr(feature = "ts", ts(export))]
3645#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3646#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3647#[cfg_attr(feature = "serde", serde(tag = "type"))]
3648#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3649#[repr(u32)]
3650#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3651pub enum MavType {
3652    #[doc = "Generic micro air vehicle"]
3653    MAV_TYPE_GENERIC = 0,
3654    #[doc = "Fixed wing aircraft."]
3655    MAV_TYPE_FIXED_WING = 1,
3656    #[doc = "Quadrotor"]
3657    MAV_TYPE_QUADROTOR = 2,
3658    #[doc = "Coaxial helicopter"]
3659    MAV_TYPE_COAXIAL = 3,
3660    #[doc = "Normal helicopter with tail rotor."]
3661    MAV_TYPE_HELICOPTER = 4,
3662    #[doc = "Ground installation"]
3663    MAV_TYPE_ANTENNA_TRACKER = 5,
3664    #[doc = "Operator control unit / ground control station"]
3665    MAV_TYPE_GCS = 6,
3666    #[doc = "Airship, controlled"]
3667    MAV_TYPE_AIRSHIP = 7,
3668    #[doc = "Free balloon, uncontrolled"]
3669    MAV_TYPE_FREE_BALLOON = 8,
3670    #[doc = "Rocket"]
3671    MAV_TYPE_ROCKET = 9,
3672    #[doc = "Ground rover"]
3673    MAV_TYPE_GROUND_ROVER = 10,
3674    #[doc = "Surface vessel, boat, ship"]
3675    MAV_TYPE_SURFACE_BOAT = 11,
3676    #[doc = "Submarine"]
3677    MAV_TYPE_SUBMARINE = 12,
3678    #[doc = "Hexarotor"]
3679    MAV_TYPE_HEXAROTOR = 13,
3680    #[doc = "Octorotor"]
3681    MAV_TYPE_OCTOROTOR = 14,
3682    #[doc = "Tricopter"]
3683    MAV_TYPE_TRICOPTER = 15,
3684    #[doc = "Flapping wing"]
3685    MAV_TYPE_FLAPPING_WING = 16,
3686    #[doc = "Kite"]
3687    MAV_TYPE_KITE = 17,
3688    #[doc = "Onboard companion controller"]
3689    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3690    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3691    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3692    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3693    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3694    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3695    MAV_TYPE_VTOL_TILTROTOR = 21,
3696    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3697    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3698    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3699    MAV_TYPE_VTOL_TAILSITTER = 23,
3700    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3701    MAV_TYPE_VTOL_TILTWING = 24,
3702    #[doc = "VTOL reserved 5"]
3703    MAV_TYPE_VTOL_RESERVED5 = 25,
3704    #[doc = "Gimbal"]
3705    MAV_TYPE_GIMBAL = 26,
3706    #[doc = "ADSB system"]
3707    MAV_TYPE_ADSB = 27,
3708    #[doc = "Steerable, nonrigid airfoil"]
3709    MAV_TYPE_PARAFOIL = 28,
3710    #[doc = "Dodecarotor"]
3711    MAV_TYPE_DODECAROTOR = 29,
3712    #[doc = "Camera"]
3713    MAV_TYPE_CAMERA = 30,
3714    #[doc = "Charging station"]
3715    MAV_TYPE_CHARGING_STATION = 31,
3716    #[doc = "FLARM collision avoidance system"]
3717    MAV_TYPE_FLARM = 32,
3718    #[doc = "Servo"]
3719    MAV_TYPE_SERVO = 33,
3720    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3721    MAV_TYPE_ODID = 34,
3722    #[doc = "Decarotor"]
3723    MAV_TYPE_DECAROTOR = 35,
3724    #[doc = "Battery"]
3725    MAV_TYPE_BATTERY = 36,
3726    #[doc = "Parachute"]
3727    MAV_TYPE_PARACHUTE = 37,
3728    #[doc = "Log"]
3729    MAV_TYPE_LOG = 38,
3730    #[doc = "OSD"]
3731    MAV_TYPE_OSD = 39,
3732    #[doc = "IMU"]
3733    MAV_TYPE_IMU = 40,
3734    #[doc = "GPS"]
3735    MAV_TYPE_GPS = 41,
3736    #[doc = "Winch"]
3737    MAV_TYPE_WINCH = 42,
3738    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3739    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3740    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3741    MAV_TYPE_ILLUMINATOR = 44,
3742    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3743    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3744}
3745impl MavType {
3746    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3747}
3748impl Default for MavType {
3749    fn default() -> Self {
3750        Self::DEFAULT
3751    }
3752}
3753#[cfg_attr(feature = "ts", derive(TS))]
3754#[cfg_attr(feature = "ts", ts(export))]
3755#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3756#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3757#[cfg_attr(feature = "serde", serde(tag = "type"))]
3758#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3759#[repr(u32)]
3760#[doc = "Enumeration of VTOL states"]
3761pub enum MavVtolState {
3762    #[doc = "MAV is not configured as VTOL"]
3763    MAV_VTOL_STATE_UNDEFINED = 0,
3764    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3765    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3766    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3767    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3768    #[doc = "VTOL is in multicopter state"]
3769    MAV_VTOL_STATE_MC = 3,
3770    #[doc = "VTOL is in fixed-wing state"]
3771    MAV_VTOL_STATE_FW = 4,
3772}
3773impl MavVtolState {
3774    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3775}
3776impl Default for MavVtolState {
3777    fn default() -> Self {
3778        Self::DEFAULT
3779    }
3780}
3781bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3782impl MavWinchStatusFlag {
3783    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3784}
3785impl Default for MavWinchStatusFlag {
3786    fn default() -> Self {
3787        Self::DEFAULT
3788    }
3789}
3790#[cfg_attr(feature = "ts", derive(TS))]
3791#[cfg_attr(feature = "ts", ts(export))]
3792#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3793#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3794#[cfg_attr(feature = "serde", serde(tag = "type"))]
3795#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3796#[repr(u32)]
3797pub enum MavlinkDataStreamType {
3798    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3799    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3800    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3801    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3802    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3803    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3804}
3805impl MavlinkDataStreamType {
3806    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3807}
3808impl Default for MavlinkDataStreamType {
3809    fn default() -> Self {
3810        Self::DEFAULT
3811    }
3812}
3813#[cfg_attr(feature = "ts", derive(TS))]
3814#[cfg_attr(feature = "ts", ts(export))]
3815#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3816#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3817#[cfg_attr(feature = "serde", serde(tag = "type"))]
3818#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3819#[repr(u32)]
3820#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3821pub enum MissionState {
3822    #[doc = "The mission status reporting is not supported."]
3823    MISSION_STATE_UNKNOWN = 0,
3824    #[doc = "No mission on the vehicle."]
3825    MISSION_STATE_NO_MISSION = 1,
3826    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3827    MISSION_STATE_NOT_STARTED = 2,
3828    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3829    MISSION_STATE_ACTIVE = 3,
3830    #[doc = "Mission is paused when in auto mode."]
3831    MISSION_STATE_PAUSED = 4,
3832    #[doc = "Mission has executed all mission items."]
3833    MISSION_STATE_COMPLETE = 5,
3834}
3835impl MissionState {
3836    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3837}
3838impl Default for MissionState {
3839    fn default() -> Self {
3840        Self::DEFAULT
3841    }
3842}
3843#[cfg_attr(feature = "ts", derive(TS))]
3844#[cfg_attr(feature = "ts", ts(export))]
3845#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3846#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3847#[cfg_attr(feature = "serde", serde(tag = "type"))]
3848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3849#[repr(u32)]
3850#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3851pub enum MotorTestOrder {
3852    #[doc = "Default autopilot motor test method."]
3853    MOTOR_TEST_ORDER_DEFAULT = 0,
3854    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3855    MOTOR_TEST_ORDER_SEQUENCE = 1,
3856    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3857    MOTOR_TEST_ORDER_BOARD = 2,
3858}
3859impl MotorTestOrder {
3860    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3861}
3862impl Default for MotorTestOrder {
3863    fn default() -> Self {
3864        Self::DEFAULT
3865    }
3866}
3867#[cfg_attr(feature = "ts", derive(TS))]
3868#[cfg_attr(feature = "ts", ts(export))]
3869#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3870#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3871#[cfg_attr(feature = "serde", serde(tag = "type"))]
3872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3873#[repr(u32)]
3874#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3875pub enum MotorTestThrottleType {
3876    #[doc = "Throttle as a percentage (0 ~ 100)"]
3877    MOTOR_TEST_THROTTLE_PERCENT = 0,
3878    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3879    MOTOR_TEST_THROTTLE_PWM = 1,
3880    #[doc = "Throttle pass-through from pilot's transmitter."]
3881    MOTOR_TEST_THROTTLE_PILOT = 2,
3882    #[doc = "Per-motor compass calibration test."]
3883    MOTOR_TEST_COMPASS_CAL = 3,
3884}
3885impl MotorTestThrottleType {
3886    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3887}
3888impl Default for MotorTestThrottleType {
3889    fn default() -> Self {
3890        Self::DEFAULT
3891    }
3892}
3893#[cfg_attr(feature = "ts", derive(TS))]
3894#[cfg_attr(feature = "ts", ts(export))]
3895#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3896#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3897#[cfg_attr(feature = "serde", serde(tag = "type"))]
3898#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3899#[repr(u32)]
3900pub enum NavVtolLandOptions {
3901    #[doc = "Default autopilot landing behaviour."]
3902    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3903    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3904    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3905    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3906    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3907}
3908impl NavVtolLandOptions {
3909    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3910}
3911impl Default for NavVtolLandOptions {
3912    fn default() -> Self {
3913        Self::DEFAULT
3914    }
3915}
3916#[cfg_attr(feature = "ts", derive(TS))]
3917#[cfg_attr(feature = "ts", ts(export))]
3918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3920#[cfg_attr(feature = "serde", serde(tag = "type"))]
3921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3922#[repr(u32)]
3923#[doc = "Yaw behaviour during orbit flight."]
3924pub enum OrbitYawBehaviour {
3925    #[doc = "Vehicle front points to the center (default)."]
3926    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3927    #[doc = "Vehicle front holds heading when message received."]
3928    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3929    #[doc = "Yaw uncontrolled."]
3930    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3931    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3932    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3933    #[doc = "Yaw controlled by RC input."]
3934    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3935    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3936    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3937}
3938impl OrbitYawBehaviour {
3939    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3940}
3941impl Default for OrbitYawBehaviour {
3942    fn default() -> Self {
3943        Self::DEFAULT
3944    }
3945}
3946#[cfg_attr(feature = "ts", derive(TS))]
3947#[cfg_attr(feature = "ts", ts(export))]
3948#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3949#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3950#[cfg_attr(feature = "serde", serde(tag = "type"))]
3951#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3952#[repr(u32)]
3953#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3954pub enum ParachuteAction {
3955    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3956    PARACHUTE_DISABLE = 0,
3957    #[doc = "Enable auto-release of parachute."]
3958    PARACHUTE_ENABLE = 1,
3959    #[doc = "Release parachute and kill motors."]
3960    PARACHUTE_RELEASE = 2,
3961}
3962impl ParachuteAction {
3963    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3964}
3965impl Default for ParachuteAction {
3966    fn default() -> Self {
3967        Self::DEFAULT
3968    }
3969}
3970#[cfg_attr(feature = "ts", derive(TS))]
3971#[cfg_attr(feature = "ts", ts(export))]
3972#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3973#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3974#[cfg_attr(feature = "serde", serde(tag = "type"))]
3975#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3976#[repr(u32)]
3977#[doc = "Result from PARAM_EXT_SET message."]
3978pub enum ParamAck {
3979    #[doc = "Parameter value ACCEPTED and SET"]
3980    PARAM_ACK_ACCEPTED = 0,
3981    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3982    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3983    #[doc = "Parameter failed to set"]
3984    PARAM_ACK_FAILED = 2,
3985    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3986    PARAM_ACK_IN_PROGRESS = 3,
3987}
3988impl ParamAck {
3989    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3990}
3991impl Default for ParamAck {
3992    fn default() -> Self {
3993        Self::DEFAULT
3994    }
3995}
3996bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
3997impl PositionTargetTypemask {
3998    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
3999}
4000impl Default for PositionTargetTypemask {
4001    fn default() -> Self {
4002        Self::DEFAULT
4003    }
4004}
4005#[cfg_attr(feature = "ts", derive(TS))]
4006#[cfg_attr(feature = "ts", ts(export))]
4007#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4008#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4009#[cfg_attr(feature = "serde", serde(tag = "type"))]
4010#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4011#[repr(u32)]
4012#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4013pub enum PrecisionLandMode {
4014    #[doc = "Normal (non-precision) landing."]
4015    PRECISION_LAND_MODE_DISABLED = 0,
4016    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4017    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4018    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4019    PRECISION_LAND_MODE_REQUIRED = 2,
4020}
4021impl PrecisionLandMode {
4022    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4023}
4024impl Default for PrecisionLandMode {
4025    fn default() -> Self {
4026        Self::DEFAULT
4027    }
4028}
4029#[cfg_attr(feature = "ts", derive(TS))]
4030#[cfg_attr(feature = "ts", ts(export))]
4031#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4033#[cfg_attr(feature = "serde", serde(tag = "type"))]
4034#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4035#[repr(u32)]
4036#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4037pub enum PreflightStorageMissionAction {
4038    #[doc = "Read current mission data from persistent storage"]
4039    MISSION_READ_PERSISTENT = 0,
4040    #[doc = "Write current mission data to persistent storage"]
4041    MISSION_WRITE_PERSISTENT = 1,
4042    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4043    MISSION_RESET_DEFAULT = 2,
4044}
4045impl PreflightStorageMissionAction {
4046    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4047}
4048impl Default for PreflightStorageMissionAction {
4049    fn default() -> Self {
4050        Self::DEFAULT
4051    }
4052}
4053#[cfg_attr(feature = "ts", derive(TS))]
4054#[cfg_attr(feature = "ts", ts(export))]
4055#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4056#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4057#[cfg_attr(feature = "serde", serde(tag = "type"))]
4058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4059#[repr(u32)]
4060#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4061pub enum PreflightStorageParameterAction {
4062    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4063    PARAM_READ_PERSISTENT = 0,
4064    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4065    PARAM_WRITE_PERSISTENT = 1,
4066    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4067    PARAM_RESET_CONFIG_DEFAULT = 2,
4068    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4069    PARAM_RESET_SENSOR_DEFAULT = 3,
4070    #[doc = "Reset all parameters, including operation counters, to default values"]
4071    PARAM_RESET_ALL_DEFAULT = 4,
4072}
4073impl PreflightStorageParameterAction {
4074    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4075}
4076impl Default for PreflightStorageParameterAction {
4077    fn default() -> Self {
4078        Self::DEFAULT
4079    }
4080}
4081#[cfg_attr(feature = "ts", derive(TS))]
4082#[cfg_attr(feature = "ts", ts(export))]
4083#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4085#[cfg_attr(feature = "serde", serde(tag = "type"))]
4086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4087#[repr(u32)]
4088#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4089pub enum RcSubType {
4090    #[doc = "Spektrum DSM2"]
4091    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4092    #[doc = "Spektrum DSMX"]
4093    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4094    #[doc = "Spektrum DSMX8"]
4095    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4096}
4097impl RcSubType {
4098    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4099}
4100impl Default for RcSubType {
4101    fn default() -> Self {
4102        Self::DEFAULT
4103    }
4104}
4105#[cfg_attr(feature = "ts", derive(TS))]
4106#[cfg_attr(feature = "ts", ts(export))]
4107#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4108#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4109#[cfg_attr(feature = "serde", serde(tag = "type"))]
4110#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4111#[repr(u32)]
4112#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4113pub enum RcType {
4114    #[doc = "Spektrum"]
4115    RC_TYPE_SPEKTRUM = 0,
4116    #[doc = "CRSF"]
4117    RC_TYPE_CRSF = 1,
4118}
4119impl RcType {
4120    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4121}
4122impl Default for RcType {
4123    fn default() -> Self {
4124        Self::DEFAULT
4125    }
4126}
4127#[cfg_attr(feature = "ts", derive(TS))]
4128#[cfg_attr(feature = "ts", ts(export))]
4129#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4131#[cfg_attr(feature = "serde", serde(tag = "type"))]
4132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4133#[repr(u32)]
4134#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4135pub enum RebootShutdownConditions {
4136    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4137    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4138    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4139    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4140}
4141impl RebootShutdownConditions {
4142    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4143}
4144impl Default for RebootShutdownConditions {
4145    fn default() -> Self {
4146        Self::DEFAULT
4147    }
4148}
4149#[cfg_attr(feature = "ts", derive(TS))]
4150#[cfg_attr(feature = "ts", ts(export))]
4151#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4153#[cfg_attr(feature = "serde", serde(tag = "type"))]
4154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4155#[repr(u32)]
4156#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4157pub enum RtkBaselineCoordinateSystem {
4158    #[doc = "Earth-centered, Earth-fixed"]
4159    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4160    #[doc = "RTK basestation centered, north, east, down"]
4161    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4162}
4163impl RtkBaselineCoordinateSystem {
4164    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4165}
4166impl Default for RtkBaselineCoordinateSystem {
4167    fn default() -> Self {
4168        Self::DEFAULT
4169    }
4170}
4171#[cfg_attr(feature = "ts", derive(TS))]
4172#[cfg_attr(feature = "ts", ts(export))]
4173#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4174#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4175#[cfg_attr(feature = "serde", serde(tag = "type"))]
4176#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4177#[repr(u32)]
4178#[doc = "Possible safety switch states."]
4179pub enum SafetySwitchState {
4180    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4181    SAFETY_SWITCH_STATE_SAFE = 0,
4182    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4183    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4184}
4185impl SafetySwitchState {
4186    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4187}
4188impl Default for SafetySwitchState {
4189    fn default() -> Self {
4190        Self::DEFAULT
4191    }
4192}
4193#[cfg_attr(feature = "ts", derive(TS))]
4194#[cfg_attr(feature = "ts", ts(export))]
4195#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4197#[cfg_attr(feature = "serde", serde(tag = "type"))]
4198#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4199#[repr(u32)]
4200#[doc = "SERIAL_CONTROL device types"]
4201pub enum SerialControlDev {
4202    #[doc = "First telemetry port"]
4203    SERIAL_CONTROL_DEV_TELEM1 = 0,
4204    #[doc = "Second telemetry port"]
4205    SERIAL_CONTROL_DEV_TELEM2 = 1,
4206    #[doc = "First GPS port"]
4207    SERIAL_CONTROL_DEV_GPS1 = 2,
4208    #[doc = "Second GPS port"]
4209    SERIAL_CONTROL_DEV_GPS2 = 3,
4210    #[doc = "system shell"]
4211    SERIAL_CONTROL_DEV_SHELL = 10,
4212    #[doc = "SERIAL0"]
4213    SERIAL_CONTROL_SERIAL0 = 100,
4214    #[doc = "SERIAL1"]
4215    SERIAL_CONTROL_SERIAL1 = 101,
4216    #[doc = "SERIAL2"]
4217    SERIAL_CONTROL_SERIAL2 = 102,
4218    #[doc = "SERIAL3"]
4219    SERIAL_CONTROL_SERIAL3 = 103,
4220    #[doc = "SERIAL4"]
4221    SERIAL_CONTROL_SERIAL4 = 104,
4222    #[doc = "SERIAL5"]
4223    SERIAL_CONTROL_SERIAL5 = 105,
4224    #[doc = "SERIAL6"]
4225    SERIAL_CONTROL_SERIAL6 = 106,
4226    #[doc = "SERIAL7"]
4227    SERIAL_CONTROL_SERIAL7 = 107,
4228    #[doc = "SERIAL8"]
4229    SERIAL_CONTROL_SERIAL8 = 108,
4230    #[doc = "SERIAL9"]
4231    SERIAL_CONTROL_SERIAL9 = 109,
4232}
4233impl SerialControlDev {
4234    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4235}
4236impl Default for SerialControlDev {
4237    fn default() -> Self {
4238        Self::DEFAULT
4239    }
4240}
4241bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4242impl SerialControlFlag {
4243    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4244}
4245impl Default for SerialControlFlag {
4246    fn default() -> Self {
4247        Self::DEFAULT
4248    }
4249}
4250#[cfg_attr(feature = "ts", derive(TS))]
4251#[cfg_attr(feature = "ts", ts(export))]
4252#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4253#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4254#[cfg_attr(feature = "serde", serde(tag = "type"))]
4255#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4256#[repr(u32)]
4257#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4258pub enum SetFocusType {
4259    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4260    FOCUS_TYPE_STEP = 0,
4261    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4262    FOCUS_TYPE_CONTINUOUS = 1,
4263    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4264    FOCUS_TYPE_RANGE = 2,
4265    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4266    FOCUS_TYPE_METERS = 3,
4267    #[doc = "Focus automatically."]
4268    FOCUS_TYPE_AUTO = 4,
4269    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4270    FOCUS_TYPE_AUTO_SINGLE = 5,
4271    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4272    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4273}
4274impl SetFocusType {
4275    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4276}
4277impl Default for SetFocusType {
4278    fn default() -> Self {
4279        Self::DEFAULT
4280    }
4281}
4282#[cfg_attr(feature = "ts", derive(TS))]
4283#[cfg_attr(feature = "ts", ts(export))]
4284#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4285#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4286#[cfg_attr(feature = "serde", serde(tag = "type"))]
4287#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4288#[repr(u32)]
4289#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4290pub enum SpeedType {
4291    #[doc = "Airspeed"]
4292    SPEED_TYPE_AIRSPEED = 0,
4293    #[doc = "Groundspeed"]
4294    SPEED_TYPE_GROUNDSPEED = 1,
4295    #[doc = "Climb speed"]
4296    SPEED_TYPE_CLIMB_SPEED = 2,
4297    #[doc = "Descent speed"]
4298    SPEED_TYPE_DESCENT_SPEED = 3,
4299}
4300impl SpeedType {
4301    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4302}
4303impl Default for SpeedType {
4304    fn default() -> Self {
4305        Self::DEFAULT
4306    }
4307}
4308#[cfg_attr(feature = "ts", derive(TS))]
4309#[cfg_attr(feature = "ts", ts(export))]
4310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4312#[cfg_attr(feature = "serde", serde(tag = "type"))]
4313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4314#[repr(u32)]
4315#[doc = "Flags to indicate the status of camera storage."]
4316pub enum StorageStatus {
4317    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4318    STORAGE_STATUS_EMPTY = 0,
4319    #[doc = "Storage present but unformatted."]
4320    STORAGE_STATUS_UNFORMATTED = 1,
4321    #[doc = "Storage present and ready."]
4322    STORAGE_STATUS_READY = 2,
4323    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4324    STORAGE_STATUS_NOT_SUPPORTED = 3,
4325}
4326impl StorageStatus {
4327    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4328}
4329impl Default for StorageStatus {
4330    fn default() -> Self {
4331        Self::DEFAULT
4332    }
4333}
4334#[cfg_attr(feature = "ts", derive(TS))]
4335#[cfg_attr(feature = "ts", ts(export))]
4336#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4338#[cfg_attr(feature = "serde", serde(tag = "type"))]
4339#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4340#[repr(u32)]
4341#[doc = "Flags to indicate the type of storage."]
4342pub enum StorageType {
4343    #[doc = "Storage type is not known."]
4344    STORAGE_TYPE_UNKNOWN = 0,
4345    #[doc = "Storage type is USB device."]
4346    STORAGE_TYPE_USB_STICK = 1,
4347    #[doc = "Storage type is SD card."]
4348    STORAGE_TYPE_SD = 2,
4349    #[doc = "Storage type is microSD card."]
4350    STORAGE_TYPE_MICROSD = 3,
4351    #[doc = "Storage type is CFast."]
4352    STORAGE_TYPE_CF = 4,
4353    #[doc = "Storage type is CFexpress."]
4354    STORAGE_TYPE_CFE = 5,
4355    #[doc = "Storage type is XQD."]
4356    STORAGE_TYPE_XQD = 6,
4357    #[doc = "Storage type is HD mass storage type."]
4358    STORAGE_TYPE_HD = 7,
4359    #[doc = "Storage type is other, not listed type."]
4360    STORAGE_TYPE_OTHER = 254,
4361}
4362impl StorageType {
4363    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4364}
4365impl Default for StorageType {
4366    fn default() -> Self {
4367        Self::DEFAULT
4368    }
4369}
4370bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4371impl StorageUsageFlag {
4372    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4373}
4374impl Default for StorageUsageFlag {
4375    fn default() -> Self {
4376        Self::DEFAULT
4377    }
4378}
4379#[cfg_attr(feature = "ts", derive(TS))]
4380#[cfg_attr(feature = "ts", ts(export))]
4381#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4382#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4383#[cfg_attr(feature = "serde", serde(tag = "type"))]
4384#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4385#[repr(u32)]
4386#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4387pub enum TuneFormat {
4388    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4389    TUNE_FORMAT_QBASIC1_1 = 1,
4390    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4391    TUNE_FORMAT_MML_MODERN = 2,
4392}
4393impl TuneFormat {
4394    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4395}
4396impl Default for TuneFormat {
4397    fn default() -> Self {
4398        Self::DEFAULT
4399    }
4400}
4401#[cfg_attr(feature = "ts", derive(TS))]
4402#[cfg_attr(feature = "ts", ts(export))]
4403#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4404#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4405#[cfg_attr(feature = "serde", serde(tag = "type"))]
4406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4407#[repr(u32)]
4408#[doc = "Generalized UAVCAN node health"]
4409pub enum UavcanNodeHealth {
4410    #[doc = "The node is functioning properly."]
4411    UAVCAN_NODE_HEALTH_OK = 0,
4412    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4413    UAVCAN_NODE_HEALTH_WARNING = 1,
4414    #[doc = "The node has encountered a major failure."]
4415    UAVCAN_NODE_HEALTH_ERROR = 2,
4416    #[doc = "The node has suffered a fatal malfunction."]
4417    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4418}
4419impl UavcanNodeHealth {
4420    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4421}
4422impl Default for UavcanNodeHealth {
4423    fn default() -> Self {
4424        Self::DEFAULT
4425    }
4426}
4427#[cfg_attr(feature = "ts", derive(TS))]
4428#[cfg_attr(feature = "ts", ts(export))]
4429#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4430#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4431#[cfg_attr(feature = "serde", serde(tag = "type"))]
4432#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4433#[repr(u32)]
4434#[doc = "Generalized UAVCAN node mode"]
4435pub enum UavcanNodeMode {
4436    #[doc = "The node is performing its primary functions."]
4437    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4438    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4439    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4440    #[doc = "The node is under maintenance."]
4441    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4442    #[doc = "The node is in the process of updating its software."]
4443    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4444    #[doc = "The node is no longer available online."]
4445    UAVCAN_NODE_MODE_OFFLINE = 7,
4446}
4447impl UavcanNodeMode {
4448    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4449}
4450impl Default for UavcanNodeMode {
4451    fn default() -> Self {
4452        Self::DEFAULT
4453    }
4454}
4455bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4456impl UtmDataAvailFlags {
4457    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4458}
4459impl Default for UtmDataAvailFlags {
4460    fn default() -> Self {
4461        Self::DEFAULT
4462    }
4463}
4464#[cfg_attr(feature = "ts", derive(TS))]
4465#[cfg_attr(feature = "ts", ts(export))]
4466#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4467#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4468#[cfg_attr(feature = "serde", serde(tag = "type"))]
4469#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4470#[repr(u32)]
4471#[doc = "Airborne status of UAS."]
4472pub enum UtmFlightState {
4473    #[doc = "The flight state can't be determined."]
4474    UTM_FLIGHT_STATE_UNKNOWN = 1,
4475    #[doc = "UAS on ground."]
4476    UTM_FLIGHT_STATE_GROUND = 2,
4477    #[doc = "UAS airborne."]
4478    UTM_FLIGHT_STATE_AIRBORNE = 3,
4479    #[doc = "UAS is in an emergency flight state."]
4480    UTM_FLIGHT_STATE_EMERGENCY = 16,
4481    #[doc = "UAS has no active controls."]
4482    UTM_FLIGHT_STATE_NOCTRL = 32,
4483}
4484impl UtmFlightState {
4485    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4486}
4487impl Default for UtmFlightState {
4488    fn default() -> Self {
4489        Self::DEFAULT
4490    }
4491}
4492#[cfg_attr(feature = "ts", derive(TS))]
4493#[cfg_attr(feature = "ts", ts(export))]
4494#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4495#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4496#[cfg_attr(feature = "serde", serde(tag = "type"))]
4497#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4498#[repr(u32)]
4499#[doc = "Video stream encodings"]
4500pub enum VideoStreamEncoding {
4501    #[doc = "Stream encoding is unknown"]
4502    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4503    #[doc = "Stream encoding is H.264"]
4504    VIDEO_STREAM_ENCODING_H264 = 1,
4505    #[doc = "Stream encoding is H.265"]
4506    VIDEO_STREAM_ENCODING_H265 = 2,
4507}
4508impl VideoStreamEncoding {
4509    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4510}
4511impl Default for VideoStreamEncoding {
4512    fn default() -> Self {
4513        Self::DEFAULT
4514    }
4515}
4516bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4517impl VideoStreamStatusFlags {
4518    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4519}
4520impl Default for VideoStreamStatusFlags {
4521    fn default() -> Self {
4522        Self::DEFAULT
4523    }
4524}
4525#[cfg_attr(feature = "ts", derive(TS))]
4526#[cfg_attr(feature = "ts", ts(export))]
4527#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4528#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4529#[cfg_attr(feature = "serde", serde(tag = "type"))]
4530#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4531#[repr(u32)]
4532#[doc = "Video stream types"]
4533pub enum VideoStreamType {
4534    #[doc = "Stream is RTSP"]
4535    VIDEO_STREAM_TYPE_RTSP = 0,
4536    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4537    VIDEO_STREAM_TYPE_RTPUDP = 1,
4538    #[doc = "Stream is MPEG on TCP"]
4539    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4540    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4541    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4542}
4543impl VideoStreamType {
4544    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4545}
4546impl Default for VideoStreamType {
4547    fn default() -> Self {
4548        Self::DEFAULT
4549    }
4550}
4551#[cfg_attr(feature = "ts", derive(TS))]
4552#[cfg_attr(feature = "ts", ts(export))]
4553#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4554#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4555#[cfg_attr(feature = "serde", serde(tag = "type"))]
4556#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4557#[repr(u32)]
4558#[doc = "Direction of VTOL transition"]
4559pub enum VtolTransitionHeading {
4560    #[doc = "Respect the heading configuration of the vehicle."]
4561    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4562    #[doc = "Use the heading pointing towards the next waypoint."]
4563    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4564    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4565    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4566    #[doc = "Use the specified heading in parameter 4."]
4567    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4568    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4569    VTOL_TRANSITION_HEADING_ANY = 4,
4570}
4571impl VtolTransitionHeading {
4572    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4573}
4574impl Default for VtolTransitionHeading {
4575    fn default() -> Self {
4576        Self::DEFAULT
4577    }
4578}
4579#[cfg_attr(feature = "ts", derive(TS))]
4580#[cfg_attr(feature = "ts", ts(export))]
4581#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4582#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4583#[cfg_attr(feature = "serde", serde(tag = "type"))]
4584#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4585#[repr(u32)]
4586#[doc = "WiFi Mode."]
4587pub enum WifiConfigApMode {
4588    #[doc = "WiFi mode is undefined."]
4589    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4590    #[doc = "WiFi configured as an access point."]
4591    WIFI_CONFIG_AP_MODE_AP = 1,
4592    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4593    WIFI_CONFIG_AP_MODE_STATION = 2,
4594    #[doc = "WiFi disabled."]
4595    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4596}
4597impl WifiConfigApMode {
4598    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4599}
4600impl Default for WifiConfigApMode {
4601    fn default() -> Self {
4602        Self::DEFAULT
4603    }
4604}
4605#[cfg_attr(feature = "ts", derive(TS))]
4606#[cfg_attr(feature = "ts", ts(export))]
4607#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4609#[cfg_attr(feature = "serde", serde(tag = "type"))]
4610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4611#[repr(u32)]
4612#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4613pub enum WifiConfigApResponse {
4614    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4615    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4616    #[doc = "Changes accepted."]
4617    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4618    #[doc = "Changes rejected."]
4619    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4620    #[doc = "Invalid Mode."]
4621    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4622    #[doc = "Invalid SSID."]
4623    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4624    #[doc = "Invalid Password."]
4625    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4626}
4627impl WifiConfigApResponse {
4628    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4629}
4630impl Default for WifiConfigApResponse {
4631    fn default() -> Self {
4632        Self::DEFAULT
4633    }
4634}
4635#[cfg_attr(feature = "ts", derive(TS))]
4636#[cfg_attr(feature = "ts", ts(export))]
4637#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4638#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4639#[cfg_attr(feature = "serde", serde(tag = "type"))]
4640#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4641#[repr(u32)]
4642#[doc = "Winch actions."]
4643pub enum WinchActions {
4644    #[doc = "Allow motor to freewheel."]
4645    WINCH_RELAXED = 0,
4646    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4647    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4648    #[doc = "Wind or unwind line at specified rate."]
4649    WINCH_RATE_CONTROL = 2,
4650    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4651    WINCH_LOCK = 3,
4652    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4653    WINCH_DELIVER = 4,
4654    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4655    WINCH_HOLD = 5,
4656    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4657    WINCH_RETRACT = 6,
4658    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4659    WINCH_LOAD_LINE = 7,
4660    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4661    WINCH_ABANDON_LINE = 8,
4662    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4663    WINCH_LOAD_PAYLOAD = 9,
4664}
4665impl WinchActions {
4666    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4667}
4668impl Default for WinchActions {
4669    fn default() -> Self {
4670        Self::DEFAULT
4671    }
4672}
4673#[doc = "Set the vehicle attitude and body angular rates."]
4674#[doc = ""]
4675#[doc = "ID: 140"]
4676#[derive(Debug, Clone, PartialEq)]
4677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4679#[cfg_attr(feature = "ts", derive(TS))]
4680#[cfg_attr(feature = "ts", ts(export))]
4681pub struct ACTUATOR_CONTROL_TARGET_DATA {
4682    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4683    pub time_usec: u64,
4684    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4685    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4686    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4687    pub controls: [f32; 8],
4688    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4689    pub group_mlx: u8,
4690}
4691impl ACTUATOR_CONTROL_TARGET_DATA {
4692    pub const ENCODED_LEN: usize = 41usize;
4693    pub const DEFAULT: Self = Self {
4694        time_usec: 0_u64,
4695        controls: [0.0_f32; 8usize],
4696        group_mlx: 0_u8,
4697    };
4698    #[cfg(feature = "arbitrary")]
4699    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4700        use arbitrary::{Arbitrary, Unstructured};
4701        let mut buf = [0u8; 1024];
4702        rng.fill_bytes(&mut buf);
4703        let mut unstructured = Unstructured::new(&buf);
4704        Self::arbitrary(&mut unstructured).unwrap_or_default()
4705    }
4706}
4707impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4708    fn default() -> Self {
4709        Self::DEFAULT.clone()
4710    }
4711}
4712impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4713    type Message = MavMessage;
4714    const ID: u32 = 140u32;
4715    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4716    const EXTRA_CRC: u8 = 181u8;
4717    const ENCODED_LEN: usize = 41usize;
4718    fn deser(
4719        _version: MavlinkVersion,
4720        __input: &[u8],
4721    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4722        let avail_len = __input.len();
4723        let mut payload_buf = [0; Self::ENCODED_LEN];
4724        let mut buf = if avail_len < Self::ENCODED_LEN {
4725            payload_buf[0..avail_len].copy_from_slice(__input);
4726            Bytes::new(&payload_buf)
4727        } else {
4728            Bytes::new(__input)
4729        };
4730        let mut __struct = Self::default();
4731        __struct.time_usec = buf.get_u64_le()?;
4732        for v in &mut __struct.controls {
4733            let val = buf.get_f32_le()?;
4734            *v = val;
4735        }
4736        __struct.group_mlx = buf.get_u8()?;
4737        Ok(__struct)
4738    }
4739    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4740        let mut __tmp = BytesMut::new(bytes);
4741        #[allow(clippy::absurd_extreme_comparisons)]
4742        #[allow(unused_comparisons)]
4743        if __tmp.remaining() < Self::ENCODED_LEN {
4744            panic!(
4745                "buffer is too small (need {} bytes, but got {})",
4746                Self::ENCODED_LEN,
4747                __tmp.remaining(),
4748            )
4749        }
4750        __tmp.put_u64_le(self.time_usec);
4751        for val in &self.controls {
4752            __tmp.put_f32_le(*val);
4753        }
4754        __tmp.put_u8(self.group_mlx);
4755        if matches!(version, MavlinkVersion::V2) {
4756            let len = __tmp.len();
4757            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4758        } else {
4759            __tmp.len()
4760        }
4761    }
4762}
4763#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4764#[doc = ""]
4765#[doc = "ID: 375"]
4766#[derive(Debug, Clone, PartialEq)]
4767#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4768#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4769#[cfg_attr(feature = "ts", derive(TS))]
4770#[cfg_attr(feature = "ts", ts(export))]
4771pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4772    #[doc = "Timestamp (since system boot)."]
4773    pub time_usec: u64,
4774    #[doc = "Active outputs"]
4775    pub active: u32,
4776    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4777    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4778    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4779    pub actuator: [f32; 32],
4780}
4781impl ACTUATOR_OUTPUT_STATUS_DATA {
4782    pub const ENCODED_LEN: usize = 140usize;
4783    pub const DEFAULT: Self = Self {
4784        time_usec: 0_u64,
4785        active: 0_u32,
4786        actuator: [0.0_f32; 32usize],
4787    };
4788    #[cfg(feature = "arbitrary")]
4789    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4790        use arbitrary::{Arbitrary, Unstructured};
4791        let mut buf = [0u8; 1024];
4792        rng.fill_bytes(&mut buf);
4793        let mut unstructured = Unstructured::new(&buf);
4794        Self::arbitrary(&mut unstructured).unwrap_or_default()
4795    }
4796}
4797impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4798    fn default() -> Self {
4799        Self::DEFAULT.clone()
4800    }
4801}
4802impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4803    type Message = MavMessage;
4804    const ID: u32 = 375u32;
4805    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4806    const EXTRA_CRC: u8 = 251u8;
4807    const ENCODED_LEN: usize = 140usize;
4808    fn deser(
4809        _version: MavlinkVersion,
4810        __input: &[u8],
4811    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4812        let avail_len = __input.len();
4813        let mut payload_buf = [0; Self::ENCODED_LEN];
4814        let mut buf = if avail_len < Self::ENCODED_LEN {
4815            payload_buf[0..avail_len].copy_from_slice(__input);
4816            Bytes::new(&payload_buf)
4817        } else {
4818            Bytes::new(__input)
4819        };
4820        let mut __struct = Self::default();
4821        __struct.time_usec = buf.get_u64_le()?;
4822        __struct.active = buf.get_u32_le()?;
4823        for v in &mut __struct.actuator {
4824            let val = buf.get_f32_le()?;
4825            *v = val;
4826        }
4827        Ok(__struct)
4828    }
4829    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4830        let mut __tmp = BytesMut::new(bytes);
4831        #[allow(clippy::absurd_extreme_comparisons)]
4832        #[allow(unused_comparisons)]
4833        if __tmp.remaining() < Self::ENCODED_LEN {
4834            panic!(
4835                "buffer is too small (need {} bytes, but got {})",
4836                Self::ENCODED_LEN,
4837                __tmp.remaining(),
4838            )
4839        }
4840        __tmp.put_u64_le(self.time_usec);
4841        __tmp.put_u32_le(self.active);
4842        for val in &self.actuator {
4843            __tmp.put_f32_le(*val);
4844        }
4845        if matches!(version, MavlinkVersion::V2) {
4846            let len = __tmp.len();
4847            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4848        } else {
4849            __tmp.len()
4850        }
4851    }
4852}
4853#[doc = "The location and information of an ADSB vehicle."]
4854#[doc = ""]
4855#[doc = "ID: 246"]
4856#[derive(Debug, Clone, PartialEq)]
4857#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4858#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4859#[cfg_attr(feature = "ts", derive(TS))]
4860#[cfg_attr(feature = "ts", ts(export))]
4861pub struct ADSB_VEHICLE_DATA {
4862    #[doc = "ICAO address"]
4863    pub ICAO_address: u32,
4864    #[doc = "Latitude"]
4865    pub lat: i32,
4866    #[doc = "Longitude"]
4867    pub lon: i32,
4868    #[doc = "Altitude(ASL)"]
4869    pub altitude: i32,
4870    #[doc = "Course over ground"]
4871    pub heading: u16,
4872    #[doc = "The horizontal velocity"]
4873    pub hor_velocity: u16,
4874    #[doc = "The vertical velocity. Positive is up"]
4875    pub ver_velocity: i16,
4876    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4877    pub flags: AdsbFlags,
4878    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4879    pub squawk: u16,
4880    #[doc = "ADSB altitude type."]
4881    pub altitude_type: AdsbAltitudeType,
4882    #[doc = "The callsign, 8+null"]
4883    #[cfg_attr(feature = "ts", ts(type = "string"))]
4884    pub callsign: CharArray<9>,
4885    #[doc = "ADSB emitter type."]
4886    pub emitter_type: AdsbEmitterType,
4887    #[doc = "Time since last communication in seconds"]
4888    pub tslc: u8,
4889}
4890impl ADSB_VEHICLE_DATA {
4891    pub const ENCODED_LEN: usize = 38usize;
4892    pub const DEFAULT: Self = Self {
4893        ICAO_address: 0_u32,
4894        lat: 0_i32,
4895        lon: 0_i32,
4896        altitude: 0_i32,
4897        heading: 0_u16,
4898        hor_velocity: 0_u16,
4899        ver_velocity: 0_i16,
4900        flags: AdsbFlags::DEFAULT,
4901        squawk: 0_u16,
4902        altitude_type: AdsbAltitudeType::DEFAULT,
4903        callsign: CharArray::new([0_u8; 9usize]),
4904        emitter_type: AdsbEmitterType::DEFAULT,
4905        tslc: 0_u8,
4906    };
4907    #[cfg(feature = "arbitrary")]
4908    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4909        use arbitrary::{Arbitrary, Unstructured};
4910        let mut buf = [0u8; 1024];
4911        rng.fill_bytes(&mut buf);
4912        let mut unstructured = Unstructured::new(&buf);
4913        Self::arbitrary(&mut unstructured).unwrap_or_default()
4914    }
4915}
4916impl Default for ADSB_VEHICLE_DATA {
4917    fn default() -> Self {
4918        Self::DEFAULT.clone()
4919    }
4920}
4921impl MessageData for ADSB_VEHICLE_DATA {
4922    type Message = MavMessage;
4923    const ID: u32 = 246u32;
4924    const NAME: &'static str = "ADSB_VEHICLE";
4925    const EXTRA_CRC: u8 = 184u8;
4926    const ENCODED_LEN: usize = 38usize;
4927    fn deser(
4928        _version: MavlinkVersion,
4929        __input: &[u8],
4930    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4931        let avail_len = __input.len();
4932        let mut payload_buf = [0; Self::ENCODED_LEN];
4933        let mut buf = if avail_len < Self::ENCODED_LEN {
4934            payload_buf[0..avail_len].copy_from_slice(__input);
4935            Bytes::new(&payload_buf)
4936        } else {
4937            Bytes::new(__input)
4938        };
4939        let mut __struct = Self::default();
4940        __struct.ICAO_address = buf.get_u32_le()?;
4941        __struct.lat = buf.get_i32_le()?;
4942        __struct.lon = buf.get_i32_le()?;
4943        __struct.altitude = buf.get_i32_le()?;
4944        __struct.heading = buf.get_u16_le()?;
4945        __struct.hor_velocity = buf.get_u16_le()?;
4946        __struct.ver_velocity = buf.get_i16_le()?;
4947        let tmp = buf.get_u16_le()?;
4948        __struct.flags = AdsbFlags::from_bits(tmp as <AdsbFlags as Flags>::Bits).ok_or(
4949            ::mavlink_core::error::ParserError::InvalidFlag {
4950                flag_type: "AdsbFlags",
4951                value: tmp as u64,
4952            },
4953        )?;
4954        __struct.squawk = buf.get_u16_le()?;
4955        let tmp = buf.get_u8()?;
4956        __struct.altitude_type =
4957            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4958                enum_type: "AdsbAltitudeType",
4959                value: tmp as u64,
4960            })?;
4961        let mut tmp = [0_u8; 9usize];
4962        for v in &mut tmp {
4963            *v = buf.get_u8()?;
4964        }
4965        __struct.callsign = CharArray::new(tmp);
4966        let tmp = buf.get_u8()?;
4967        __struct.emitter_type =
4968            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4969                enum_type: "AdsbEmitterType",
4970                value: tmp as u64,
4971            })?;
4972        __struct.tslc = buf.get_u8()?;
4973        Ok(__struct)
4974    }
4975    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4976        let mut __tmp = BytesMut::new(bytes);
4977        #[allow(clippy::absurd_extreme_comparisons)]
4978        #[allow(unused_comparisons)]
4979        if __tmp.remaining() < Self::ENCODED_LEN {
4980            panic!(
4981                "buffer is too small (need {} bytes, but got {})",
4982                Self::ENCODED_LEN,
4983                __tmp.remaining(),
4984            )
4985        }
4986        __tmp.put_u32_le(self.ICAO_address);
4987        __tmp.put_i32_le(self.lat);
4988        __tmp.put_i32_le(self.lon);
4989        __tmp.put_i32_le(self.altitude);
4990        __tmp.put_u16_le(self.heading);
4991        __tmp.put_u16_le(self.hor_velocity);
4992        __tmp.put_i16_le(self.ver_velocity);
4993        __tmp.put_u16_le(self.flags.bits() as u16);
4994        __tmp.put_u16_le(self.squawk);
4995        __tmp.put_u8(self.altitude_type as u8);
4996        for val in &self.callsign {
4997            __tmp.put_u8(*val);
4998        }
4999        __tmp.put_u8(self.emitter_type as u8);
5000        __tmp.put_u8(self.tslc);
5001        if matches!(version, MavlinkVersion::V2) {
5002            let len = __tmp.len();
5003            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5004        } else {
5005            __tmp.len()
5006        }
5007    }
5008}
5009#[doc = "The location and information of an AIS vessel."]
5010#[doc = ""]
5011#[doc = "ID: 301"]
5012#[derive(Debug, Clone, PartialEq)]
5013#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5014#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5015#[cfg_attr(feature = "ts", derive(TS))]
5016#[cfg_attr(feature = "ts", ts(export))]
5017pub struct AIS_VESSEL_DATA {
5018    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5019    pub MMSI: u32,
5020    #[doc = "Latitude"]
5021    pub lat: i32,
5022    #[doc = "Longitude"]
5023    pub lon: i32,
5024    #[doc = "Course over ground"]
5025    pub COG: u16,
5026    #[doc = "True heading"]
5027    pub heading: u16,
5028    #[doc = "Speed over ground"]
5029    pub velocity: u16,
5030    #[doc = "Distance from lat/lon location to bow"]
5031    pub dimension_bow: u16,
5032    #[doc = "Distance from lat/lon location to stern"]
5033    pub dimension_stern: u16,
5034    #[doc = "Time since last communication in seconds"]
5035    pub tslc: u16,
5036    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5037    pub flags: AisFlags,
5038    #[doc = "Turn rate"]
5039    pub turn_rate: i8,
5040    #[doc = "Navigational status"]
5041    pub navigational_status: AisNavStatus,
5042    #[doc = "Type of vessels"]
5043    pub mavtype: AisType,
5044    #[doc = "Distance from lat/lon location to port side"]
5045    pub dimension_port: u8,
5046    #[doc = "Distance from lat/lon location to starboard side"]
5047    pub dimension_starboard: u8,
5048    #[doc = "The vessel callsign"]
5049    #[cfg_attr(feature = "ts", ts(type = "string"))]
5050    pub callsign: CharArray<7>,
5051    #[doc = "The vessel name"]
5052    #[cfg_attr(feature = "ts", ts(type = "string"))]
5053    pub name: CharArray<20>,
5054}
5055impl AIS_VESSEL_DATA {
5056    pub const ENCODED_LEN: usize = 58usize;
5057    pub const DEFAULT: Self = Self {
5058        MMSI: 0_u32,
5059        lat: 0_i32,
5060        lon: 0_i32,
5061        COG: 0_u16,
5062        heading: 0_u16,
5063        velocity: 0_u16,
5064        dimension_bow: 0_u16,
5065        dimension_stern: 0_u16,
5066        tslc: 0_u16,
5067        flags: AisFlags::DEFAULT,
5068        turn_rate: 0_i8,
5069        navigational_status: AisNavStatus::DEFAULT,
5070        mavtype: AisType::DEFAULT,
5071        dimension_port: 0_u8,
5072        dimension_starboard: 0_u8,
5073        callsign: CharArray::new([0_u8; 7usize]),
5074        name: CharArray::new([0_u8; 20usize]),
5075    };
5076    #[cfg(feature = "arbitrary")]
5077    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5078        use arbitrary::{Arbitrary, Unstructured};
5079        let mut buf = [0u8; 1024];
5080        rng.fill_bytes(&mut buf);
5081        let mut unstructured = Unstructured::new(&buf);
5082        Self::arbitrary(&mut unstructured).unwrap_or_default()
5083    }
5084}
5085impl Default for AIS_VESSEL_DATA {
5086    fn default() -> Self {
5087        Self::DEFAULT.clone()
5088    }
5089}
5090impl MessageData for AIS_VESSEL_DATA {
5091    type Message = MavMessage;
5092    const ID: u32 = 301u32;
5093    const NAME: &'static str = "AIS_VESSEL";
5094    const EXTRA_CRC: u8 = 243u8;
5095    const ENCODED_LEN: usize = 58usize;
5096    fn deser(
5097        _version: MavlinkVersion,
5098        __input: &[u8],
5099    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5100        let avail_len = __input.len();
5101        let mut payload_buf = [0; Self::ENCODED_LEN];
5102        let mut buf = if avail_len < Self::ENCODED_LEN {
5103            payload_buf[0..avail_len].copy_from_slice(__input);
5104            Bytes::new(&payload_buf)
5105        } else {
5106            Bytes::new(__input)
5107        };
5108        let mut __struct = Self::default();
5109        __struct.MMSI = buf.get_u32_le()?;
5110        __struct.lat = buf.get_i32_le()?;
5111        __struct.lon = buf.get_i32_le()?;
5112        __struct.COG = buf.get_u16_le()?;
5113        __struct.heading = buf.get_u16_le()?;
5114        __struct.velocity = buf.get_u16_le()?;
5115        __struct.dimension_bow = buf.get_u16_le()?;
5116        __struct.dimension_stern = buf.get_u16_le()?;
5117        __struct.tslc = buf.get_u16_le()?;
5118        let tmp = buf.get_u16_le()?;
5119        __struct.flags = AisFlags::from_bits(tmp as <AisFlags as Flags>::Bits).ok_or(
5120            ::mavlink_core::error::ParserError::InvalidFlag {
5121                flag_type: "AisFlags",
5122                value: tmp as u64,
5123            },
5124        )?;
5125        __struct.turn_rate = buf.get_i8()?;
5126        let tmp = buf.get_u8()?;
5127        __struct.navigational_status =
5128            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5129                enum_type: "AisNavStatus",
5130                value: tmp as u64,
5131            })?;
5132        let tmp = buf.get_u8()?;
5133        __struct.mavtype =
5134            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5135                enum_type: "AisType",
5136                value: tmp as u64,
5137            })?;
5138        __struct.dimension_port = buf.get_u8()?;
5139        __struct.dimension_starboard = buf.get_u8()?;
5140        let mut tmp = [0_u8; 7usize];
5141        for v in &mut tmp {
5142            *v = buf.get_u8()?;
5143        }
5144        __struct.callsign = CharArray::new(tmp);
5145        let mut tmp = [0_u8; 20usize];
5146        for v in &mut tmp {
5147            *v = buf.get_u8()?;
5148        }
5149        __struct.name = CharArray::new(tmp);
5150        Ok(__struct)
5151    }
5152    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5153        let mut __tmp = BytesMut::new(bytes);
5154        #[allow(clippy::absurd_extreme_comparisons)]
5155        #[allow(unused_comparisons)]
5156        if __tmp.remaining() < Self::ENCODED_LEN {
5157            panic!(
5158                "buffer is too small (need {} bytes, but got {})",
5159                Self::ENCODED_LEN,
5160                __tmp.remaining(),
5161            )
5162        }
5163        __tmp.put_u32_le(self.MMSI);
5164        __tmp.put_i32_le(self.lat);
5165        __tmp.put_i32_le(self.lon);
5166        __tmp.put_u16_le(self.COG);
5167        __tmp.put_u16_le(self.heading);
5168        __tmp.put_u16_le(self.velocity);
5169        __tmp.put_u16_le(self.dimension_bow);
5170        __tmp.put_u16_le(self.dimension_stern);
5171        __tmp.put_u16_le(self.tslc);
5172        __tmp.put_u16_le(self.flags.bits() as u16);
5173        __tmp.put_i8(self.turn_rate);
5174        __tmp.put_u8(self.navigational_status as u8);
5175        __tmp.put_u8(self.mavtype as u8);
5176        __tmp.put_u8(self.dimension_port);
5177        __tmp.put_u8(self.dimension_starboard);
5178        for val in &self.callsign {
5179            __tmp.put_u8(*val);
5180        }
5181        for val in &self.name {
5182            __tmp.put_u8(*val);
5183        }
5184        if matches!(version, MavlinkVersion::V2) {
5185            let len = __tmp.len();
5186            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5187        } else {
5188            __tmp.len()
5189        }
5190    }
5191}
5192#[doc = "The current system altitude."]
5193#[doc = ""]
5194#[doc = "ID: 141"]
5195#[derive(Debug, Clone, PartialEq)]
5196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5197#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5198#[cfg_attr(feature = "ts", derive(TS))]
5199#[cfg_attr(feature = "ts", ts(export))]
5200pub struct ALTITUDE_DATA {
5201    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5202    pub time_usec: u64,
5203    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5204    pub altitude_monotonic: f32,
5205    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5206    pub altitude_amsl: f32,
5207    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5208    pub altitude_local: f32,
5209    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5210    pub altitude_relative: f32,
5211    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5212    pub altitude_terrain: f32,
5213    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5214    pub bottom_clearance: f32,
5215}
5216impl ALTITUDE_DATA {
5217    pub const ENCODED_LEN: usize = 32usize;
5218    pub const DEFAULT: Self = Self {
5219        time_usec: 0_u64,
5220        altitude_monotonic: 0.0_f32,
5221        altitude_amsl: 0.0_f32,
5222        altitude_local: 0.0_f32,
5223        altitude_relative: 0.0_f32,
5224        altitude_terrain: 0.0_f32,
5225        bottom_clearance: 0.0_f32,
5226    };
5227    #[cfg(feature = "arbitrary")]
5228    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5229        use arbitrary::{Arbitrary, Unstructured};
5230        let mut buf = [0u8; 1024];
5231        rng.fill_bytes(&mut buf);
5232        let mut unstructured = Unstructured::new(&buf);
5233        Self::arbitrary(&mut unstructured).unwrap_or_default()
5234    }
5235}
5236impl Default for ALTITUDE_DATA {
5237    fn default() -> Self {
5238        Self::DEFAULT.clone()
5239    }
5240}
5241impl MessageData for ALTITUDE_DATA {
5242    type Message = MavMessage;
5243    const ID: u32 = 141u32;
5244    const NAME: &'static str = "ALTITUDE";
5245    const EXTRA_CRC: u8 = 47u8;
5246    const ENCODED_LEN: usize = 32usize;
5247    fn deser(
5248        _version: MavlinkVersion,
5249        __input: &[u8],
5250    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5251        let avail_len = __input.len();
5252        let mut payload_buf = [0; Self::ENCODED_LEN];
5253        let mut buf = if avail_len < Self::ENCODED_LEN {
5254            payload_buf[0..avail_len].copy_from_slice(__input);
5255            Bytes::new(&payload_buf)
5256        } else {
5257            Bytes::new(__input)
5258        };
5259        let mut __struct = Self::default();
5260        __struct.time_usec = buf.get_u64_le()?;
5261        __struct.altitude_monotonic = buf.get_f32_le()?;
5262        __struct.altitude_amsl = buf.get_f32_le()?;
5263        __struct.altitude_local = buf.get_f32_le()?;
5264        __struct.altitude_relative = buf.get_f32_le()?;
5265        __struct.altitude_terrain = buf.get_f32_le()?;
5266        __struct.bottom_clearance = buf.get_f32_le()?;
5267        Ok(__struct)
5268    }
5269    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5270        let mut __tmp = BytesMut::new(bytes);
5271        #[allow(clippy::absurd_extreme_comparisons)]
5272        #[allow(unused_comparisons)]
5273        if __tmp.remaining() < Self::ENCODED_LEN {
5274            panic!(
5275                "buffer is too small (need {} bytes, but got {})",
5276                Self::ENCODED_LEN,
5277                __tmp.remaining(),
5278            )
5279        }
5280        __tmp.put_u64_le(self.time_usec);
5281        __tmp.put_f32_le(self.altitude_monotonic);
5282        __tmp.put_f32_le(self.altitude_amsl);
5283        __tmp.put_f32_le(self.altitude_local);
5284        __tmp.put_f32_le(self.altitude_relative);
5285        __tmp.put_f32_le(self.altitude_terrain);
5286        __tmp.put_f32_le(self.bottom_clearance);
5287        if matches!(version, MavlinkVersion::V2) {
5288            let len = __tmp.len();
5289            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5290        } else {
5291            __tmp.len()
5292        }
5293    }
5294}
5295#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5296#[doc = ""]
5297#[doc = "ID: 30"]
5298#[derive(Debug, Clone, PartialEq)]
5299#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5300#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5301#[cfg_attr(feature = "ts", derive(TS))]
5302#[cfg_attr(feature = "ts", ts(export))]
5303pub struct ATTITUDE_DATA {
5304    #[doc = "Timestamp (time since system boot)."]
5305    pub time_boot_ms: u32,
5306    #[doc = "Roll angle (-pi..+pi)"]
5307    pub roll: f32,
5308    #[doc = "Pitch angle (-pi..+pi)"]
5309    pub pitch: f32,
5310    #[doc = "Yaw angle (-pi..+pi)"]
5311    pub yaw: f32,
5312    #[doc = "Roll angular speed"]
5313    pub rollspeed: f32,
5314    #[doc = "Pitch angular speed"]
5315    pub pitchspeed: f32,
5316    #[doc = "Yaw angular speed"]
5317    pub yawspeed: f32,
5318}
5319impl ATTITUDE_DATA {
5320    pub const ENCODED_LEN: usize = 28usize;
5321    pub const DEFAULT: Self = Self {
5322        time_boot_ms: 0_u32,
5323        roll: 0.0_f32,
5324        pitch: 0.0_f32,
5325        yaw: 0.0_f32,
5326        rollspeed: 0.0_f32,
5327        pitchspeed: 0.0_f32,
5328        yawspeed: 0.0_f32,
5329    };
5330    #[cfg(feature = "arbitrary")]
5331    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5332        use arbitrary::{Arbitrary, Unstructured};
5333        let mut buf = [0u8; 1024];
5334        rng.fill_bytes(&mut buf);
5335        let mut unstructured = Unstructured::new(&buf);
5336        Self::arbitrary(&mut unstructured).unwrap_or_default()
5337    }
5338}
5339impl Default for ATTITUDE_DATA {
5340    fn default() -> Self {
5341        Self::DEFAULT.clone()
5342    }
5343}
5344impl MessageData for ATTITUDE_DATA {
5345    type Message = MavMessage;
5346    const ID: u32 = 30u32;
5347    const NAME: &'static str = "ATTITUDE";
5348    const EXTRA_CRC: u8 = 39u8;
5349    const ENCODED_LEN: usize = 28usize;
5350    fn deser(
5351        _version: MavlinkVersion,
5352        __input: &[u8],
5353    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5354        let avail_len = __input.len();
5355        let mut payload_buf = [0; Self::ENCODED_LEN];
5356        let mut buf = if avail_len < Self::ENCODED_LEN {
5357            payload_buf[0..avail_len].copy_from_slice(__input);
5358            Bytes::new(&payload_buf)
5359        } else {
5360            Bytes::new(__input)
5361        };
5362        let mut __struct = Self::default();
5363        __struct.time_boot_ms = buf.get_u32_le()?;
5364        __struct.roll = buf.get_f32_le()?;
5365        __struct.pitch = buf.get_f32_le()?;
5366        __struct.yaw = buf.get_f32_le()?;
5367        __struct.rollspeed = buf.get_f32_le()?;
5368        __struct.pitchspeed = buf.get_f32_le()?;
5369        __struct.yawspeed = buf.get_f32_le()?;
5370        Ok(__struct)
5371    }
5372    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5373        let mut __tmp = BytesMut::new(bytes);
5374        #[allow(clippy::absurd_extreme_comparisons)]
5375        #[allow(unused_comparisons)]
5376        if __tmp.remaining() < Self::ENCODED_LEN {
5377            panic!(
5378                "buffer is too small (need {} bytes, but got {})",
5379                Self::ENCODED_LEN,
5380                __tmp.remaining(),
5381            )
5382        }
5383        __tmp.put_u32_le(self.time_boot_ms);
5384        __tmp.put_f32_le(self.roll);
5385        __tmp.put_f32_le(self.pitch);
5386        __tmp.put_f32_le(self.yaw);
5387        __tmp.put_f32_le(self.rollspeed);
5388        __tmp.put_f32_le(self.pitchspeed);
5389        __tmp.put_f32_le(self.yawspeed);
5390        if matches!(version, MavlinkVersion::V2) {
5391            let len = __tmp.len();
5392            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5393        } else {
5394            __tmp.len()
5395        }
5396    }
5397}
5398#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5399#[doc = ""]
5400#[doc = "ID: 31"]
5401#[derive(Debug, Clone, PartialEq)]
5402#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5403#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5404#[cfg_attr(feature = "ts", derive(TS))]
5405#[cfg_attr(feature = "ts", ts(export))]
5406pub struct ATTITUDE_QUATERNION_DATA {
5407    #[doc = "Timestamp (time since system boot)."]
5408    pub time_boot_ms: u32,
5409    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5410    pub q1: f32,
5411    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5412    pub q2: f32,
5413    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5414    pub q3: f32,
5415    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5416    pub q4: f32,
5417    #[doc = "Roll angular speed"]
5418    pub rollspeed: f32,
5419    #[doc = "Pitch angular speed"]
5420    pub pitchspeed: f32,
5421    #[doc = "Yaw angular speed"]
5422    pub yawspeed: f32,
5423    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5424    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5425    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5426    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5427    pub repr_offset_q: [f32; 4],
5428}
5429impl ATTITUDE_QUATERNION_DATA {
5430    pub const ENCODED_LEN: usize = 48usize;
5431    pub const DEFAULT: Self = Self {
5432        time_boot_ms: 0_u32,
5433        q1: 0.0_f32,
5434        q2: 0.0_f32,
5435        q3: 0.0_f32,
5436        q4: 0.0_f32,
5437        rollspeed: 0.0_f32,
5438        pitchspeed: 0.0_f32,
5439        yawspeed: 0.0_f32,
5440        repr_offset_q: [0.0_f32; 4usize],
5441    };
5442    #[cfg(feature = "arbitrary")]
5443    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5444        use arbitrary::{Arbitrary, Unstructured};
5445        let mut buf = [0u8; 1024];
5446        rng.fill_bytes(&mut buf);
5447        let mut unstructured = Unstructured::new(&buf);
5448        Self::arbitrary(&mut unstructured).unwrap_or_default()
5449    }
5450}
5451impl Default for ATTITUDE_QUATERNION_DATA {
5452    fn default() -> Self {
5453        Self::DEFAULT.clone()
5454    }
5455}
5456impl MessageData for ATTITUDE_QUATERNION_DATA {
5457    type Message = MavMessage;
5458    const ID: u32 = 31u32;
5459    const NAME: &'static str = "ATTITUDE_QUATERNION";
5460    const EXTRA_CRC: u8 = 246u8;
5461    const ENCODED_LEN: usize = 48usize;
5462    fn deser(
5463        _version: MavlinkVersion,
5464        __input: &[u8],
5465    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5466        let avail_len = __input.len();
5467        let mut payload_buf = [0; Self::ENCODED_LEN];
5468        let mut buf = if avail_len < Self::ENCODED_LEN {
5469            payload_buf[0..avail_len].copy_from_slice(__input);
5470            Bytes::new(&payload_buf)
5471        } else {
5472            Bytes::new(__input)
5473        };
5474        let mut __struct = Self::default();
5475        __struct.time_boot_ms = buf.get_u32_le()?;
5476        __struct.q1 = buf.get_f32_le()?;
5477        __struct.q2 = buf.get_f32_le()?;
5478        __struct.q3 = buf.get_f32_le()?;
5479        __struct.q4 = buf.get_f32_le()?;
5480        __struct.rollspeed = buf.get_f32_le()?;
5481        __struct.pitchspeed = buf.get_f32_le()?;
5482        __struct.yawspeed = buf.get_f32_le()?;
5483        for v in &mut __struct.repr_offset_q {
5484            let val = buf.get_f32_le()?;
5485            *v = val;
5486        }
5487        Ok(__struct)
5488    }
5489    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5490        let mut __tmp = BytesMut::new(bytes);
5491        #[allow(clippy::absurd_extreme_comparisons)]
5492        #[allow(unused_comparisons)]
5493        if __tmp.remaining() < Self::ENCODED_LEN {
5494            panic!(
5495                "buffer is too small (need {} bytes, but got {})",
5496                Self::ENCODED_LEN,
5497                __tmp.remaining(),
5498            )
5499        }
5500        __tmp.put_u32_le(self.time_boot_ms);
5501        __tmp.put_f32_le(self.q1);
5502        __tmp.put_f32_le(self.q2);
5503        __tmp.put_f32_le(self.q3);
5504        __tmp.put_f32_le(self.q4);
5505        __tmp.put_f32_le(self.rollspeed);
5506        __tmp.put_f32_le(self.pitchspeed);
5507        __tmp.put_f32_le(self.yawspeed);
5508        if matches!(version, MavlinkVersion::V2) {
5509            for val in &self.repr_offset_q {
5510                __tmp.put_f32_le(*val);
5511            }
5512            let len = __tmp.len();
5513            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5514        } else {
5515            __tmp.len()
5516        }
5517    }
5518}
5519#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5520#[doc = ""]
5521#[doc = "ID: 61"]
5522#[derive(Debug, Clone, PartialEq)]
5523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5525#[cfg_attr(feature = "ts", derive(TS))]
5526#[cfg_attr(feature = "ts", ts(export))]
5527pub struct ATTITUDE_QUATERNION_COV_DATA {
5528    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5529    pub time_usec: u64,
5530    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5531    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5532    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5533    pub q: [f32; 4],
5534    #[doc = "Roll angular speed"]
5535    pub rollspeed: f32,
5536    #[doc = "Pitch angular speed"]
5537    pub pitchspeed: f32,
5538    #[doc = "Yaw angular speed"]
5539    pub yawspeed: f32,
5540    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5541    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5542    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5543    pub covariance: [f32; 9],
5544}
5545impl ATTITUDE_QUATERNION_COV_DATA {
5546    pub const ENCODED_LEN: usize = 72usize;
5547    pub const DEFAULT: Self = Self {
5548        time_usec: 0_u64,
5549        q: [0.0_f32; 4usize],
5550        rollspeed: 0.0_f32,
5551        pitchspeed: 0.0_f32,
5552        yawspeed: 0.0_f32,
5553        covariance: [0.0_f32; 9usize],
5554    };
5555    #[cfg(feature = "arbitrary")]
5556    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5557        use arbitrary::{Arbitrary, Unstructured};
5558        let mut buf = [0u8; 1024];
5559        rng.fill_bytes(&mut buf);
5560        let mut unstructured = Unstructured::new(&buf);
5561        Self::arbitrary(&mut unstructured).unwrap_or_default()
5562    }
5563}
5564impl Default for ATTITUDE_QUATERNION_COV_DATA {
5565    fn default() -> Self {
5566        Self::DEFAULT.clone()
5567    }
5568}
5569impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5570    type Message = MavMessage;
5571    const ID: u32 = 61u32;
5572    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5573    const EXTRA_CRC: u8 = 167u8;
5574    const ENCODED_LEN: usize = 72usize;
5575    fn deser(
5576        _version: MavlinkVersion,
5577        __input: &[u8],
5578    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5579        let avail_len = __input.len();
5580        let mut payload_buf = [0; Self::ENCODED_LEN];
5581        let mut buf = if avail_len < Self::ENCODED_LEN {
5582            payload_buf[0..avail_len].copy_from_slice(__input);
5583            Bytes::new(&payload_buf)
5584        } else {
5585            Bytes::new(__input)
5586        };
5587        let mut __struct = Self::default();
5588        __struct.time_usec = buf.get_u64_le()?;
5589        for v in &mut __struct.q {
5590            let val = buf.get_f32_le()?;
5591            *v = val;
5592        }
5593        __struct.rollspeed = buf.get_f32_le()?;
5594        __struct.pitchspeed = buf.get_f32_le()?;
5595        __struct.yawspeed = buf.get_f32_le()?;
5596        for v in &mut __struct.covariance {
5597            let val = buf.get_f32_le()?;
5598            *v = val;
5599        }
5600        Ok(__struct)
5601    }
5602    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5603        let mut __tmp = BytesMut::new(bytes);
5604        #[allow(clippy::absurd_extreme_comparisons)]
5605        #[allow(unused_comparisons)]
5606        if __tmp.remaining() < Self::ENCODED_LEN {
5607            panic!(
5608                "buffer is too small (need {} bytes, but got {})",
5609                Self::ENCODED_LEN,
5610                __tmp.remaining(),
5611            )
5612        }
5613        __tmp.put_u64_le(self.time_usec);
5614        for val in &self.q {
5615            __tmp.put_f32_le(*val);
5616        }
5617        __tmp.put_f32_le(self.rollspeed);
5618        __tmp.put_f32_le(self.pitchspeed);
5619        __tmp.put_f32_le(self.yawspeed);
5620        for val in &self.covariance {
5621            __tmp.put_f32_le(*val);
5622        }
5623        if matches!(version, MavlinkVersion::V2) {
5624            let len = __tmp.len();
5625            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5626        } else {
5627            __tmp.len()
5628        }
5629    }
5630}
5631#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5632#[doc = ""]
5633#[doc = "ID: 83"]
5634#[derive(Debug, Clone, PartialEq)]
5635#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5637#[cfg_attr(feature = "ts", derive(TS))]
5638#[cfg_attr(feature = "ts", ts(export))]
5639pub struct ATTITUDE_TARGET_DATA {
5640    #[doc = "Timestamp (time since system boot)."]
5641    pub time_boot_ms: u32,
5642    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5643    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5644    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5645    pub q: [f32; 4],
5646    #[doc = "Body roll rate"]
5647    pub body_roll_rate: f32,
5648    #[doc = "Body pitch rate"]
5649    pub body_pitch_rate: f32,
5650    #[doc = "Body yaw rate"]
5651    pub body_yaw_rate: f32,
5652    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5653    pub thrust: f32,
5654    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5655    pub type_mask: AttitudeTargetTypemask,
5656}
5657impl ATTITUDE_TARGET_DATA {
5658    pub const ENCODED_LEN: usize = 37usize;
5659    pub const DEFAULT: Self = Self {
5660        time_boot_ms: 0_u32,
5661        q: [0.0_f32; 4usize],
5662        body_roll_rate: 0.0_f32,
5663        body_pitch_rate: 0.0_f32,
5664        body_yaw_rate: 0.0_f32,
5665        thrust: 0.0_f32,
5666        type_mask: AttitudeTargetTypemask::DEFAULT,
5667    };
5668    #[cfg(feature = "arbitrary")]
5669    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5670        use arbitrary::{Arbitrary, Unstructured};
5671        let mut buf = [0u8; 1024];
5672        rng.fill_bytes(&mut buf);
5673        let mut unstructured = Unstructured::new(&buf);
5674        Self::arbitrary(&mut unstructured).unwrap_or_default()
5675    }
5676}
5677impl Default for ATTITUDE_TARGET_DATA {
5678    fn default() -> Self {
5679        Self::DEFAULT.clone()
5680    }
5681}
5682impl MessageData for ATTITUDE_TARGET_DATA {
5683    type Message = MavMessage;
5684    const ID: u32 = 83u32;
5685    const NAME: &'static str = "ATTITUDE_TARGET";
5686    const EXTRA_CRC: u8 = 22u8;
5687    const ENCODED_LEN: usize = 37usize;
5688    fn deser(
5689        _version: MavlinkVersion,
5690        __input: &[u8],
5691    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5692        let avail_len = __input.len();
5693        let mut payload_buf = [0; Self::ENCODED_LEN];
5694        let mut buf = if avail_len < Self::ENCODED_LEN {
5695            payload_buf[0..avail_len].copy_from_slice(__input);
5696            Bytes::new(&payload_buf)
5697        } else {
5698            Bytes::new(__input)
5699        };
5700        let mut __struct = Self::default();
5701        __struct.time_boot_ms = buf.get_u32_le()?;
5702        for v in &mut __struct.q {
5703            let val = buf.get_f32_le()?;
5704            *v = val;
5705        }
5706        __struct.body_roll_rate = buf.get_f32_le()?;
5707        __struct.body_pitch_rate = buf.get_f32_le()?;
5708        __struct.body_yaw_rate = buf.get_f32_le()?;
5709        __struct.thrust = buf.get_f32_le()?;
5710        let tmp = buf.get_u8()?;
5711        __struct.type_mask =
5712            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
5713                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5714                    flag_type: "AttitudeTargetTypemask",
5715                    value: tmp as u64,
5716                })?;
5717        Ok(__struct)
5718    }
5719    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5720        let mut __tmp = BytesMut::new(bytes);
5721        #[allow(clippy::absurd_extreme_comparisons)]
5722        #[allow(unused_comparisons)]
5723        if __tmp.remaining() < Self::ENCODED_LEN {
5724            panic!(
5725                "buffer is too small (need {} bytes, but got {})",
5726                Self::ENCODED_LEN,
5727                __tmp.remaining(),
5728            )
5729        }
5730        __tmp.put_u32_le(self.time_boot_ms);
5731        for val in &self.q {
5732            __tmp.put_f32_le(*val);
5733        }
5734        __tmp.put_f32_le(self.body_roll_rate);
5735        __tmp.put_f32_le(self.body_pitch_rate);
5736        __tmp.put_f32_le(self.body_yaw_rate);
5737        __tmp.put_f32_le(self.thrust);
5738        __tmp.put_u8(self.type_mask.bits() as u8);
5739        if matches!(version, MavlinkVersion::V2) {
5740            let len = __tmp.len();
5741            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5742        } else {
5743            __tmp.len()
5744        }
5745    }
5746}
5747#[doc = "Motion capture attitude and position."]
5748#[doc = ""]
5749#[doc = "ID: 138"]
5750#[derive(Debug, Clone, PartialEq)]
5751#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5752#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5753#[cfg_attr(feature = "ts", derive(TS))]
5754#[cfg_attr(feature = "ts", ts(export))]
5755pub struct ATT_POS_MOCAP_DATA {
5756    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5757    pub time_usec: u64,
5758    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5759    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5760    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5761    pub q: [f32; 4],
5762    #[doc = "X position (NED)"]
5763    pub x: f32,
5764    #[doc = "Y position (NED)"]
5765    pub y: f32,
5766    #[doc = "Z position (NED)"]
5767    pub z: f32,
5768    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
5769    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5770    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5771    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5772    pub covariance: [f32; 21],
5773}
5774impl ATT_POS_MOCAP_DATA {
5775    pub const ENCODED_LEN: usize = 120usize;
5776    pub const DEFAULT: Self = Self {
5777        time_usec: 0_u64,
5778        q: [0.0_f32; 4usize],
5779        x: 0.0_f32,
5780        y: 0.0_f32,
5781        z: 0.0_f32,
5782        covariance: [0.0_f32; 21usize],
5783    };
5784    #[cfg(feature = "arbitrary")]
5785    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5786        use arbitrary::{Arbitrary, Unstructured};
5787        let mut buf = [0u8; 1024];
5788        rng.fill_bytes(&mut buf);
5789        let mut unstructured = Unstructured::new(&buf);
5790        Self::arbitrary(&mut unstructured).unwrap_or_default()
5791    }
5792}
5793impl Default for ATT_POS_MOCAP_DATA {
5794    fn default() -> Self {
5795        Self::DEFAULT.clone()
5796    }
5797}
5798impl MessageData for ATT_POS_MOCAP_DATA {
5799    type Message = MavMessage;
5800    const ID: u32 = 138u32;
5801    const NAME: &'static str = "ATT_POS_MOCAP";
5802    const EXTRA_CRC: u8 = 109u8;
5803    const ENCODED_LEN: usize = 120usize;
5804    fn deser(
5805        _version: MavlinkVersion,
5806        __input: &[u8],
5807    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5808        let avail_len = __input.len();
5809        let mut payload_buf = [0; Self::ENCODED_LEN];
5810        let mut buf = if avail_len < Self::ENCODED_LEN {
5811            payload_buf[0..avail_len].copy_from_slice(__input);
5812            Bytes::new(&payload_buf)
5813        } else {
5814            Bytes::new(__input)
5815        };
5816        let mut __struct = Self::default();
5817        __struct.time_usec = buf.get_u64_le()?;
5818        for v in &mut __struct.q {
5819            let val = buf.get_f32_le()?;
5820            *v = val;
5821        }
5822        __struct.x = buf.get_f32_le()?;
5823        __struct.y = buf.get_f32_le()?;
5824        __struct.z = buf.get_f32_le()?;
5825        for v in &mut __struct.covariance {
5826            let val = buf.get_f32_le()?;
5827            *v = val;
5828        }
5829        Ok(__struct)
5830    }
5831    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5832        let mut __tmp = BytesMut::new(bytes);
5833        #[allow(clippy::absurd_extreme_comparisons)]
5834        #[allow(unused_comparisons)]
5835        if __tmp.remaining() < Self::ENCODED_LEN {
5836            panic!(
5837                "buffer is too small (need {} bytes, but got {})",
5838                Self::ENCODED_LEN,
5839                __tmp.remaining(),
5840            )
5841        }
5842        __tmp.put_u64_le(self.time_usec);
5843        for val in &self.q {
5844            __tmp.put_f32_le(*val);
5845        }
5846        __tmp.put_f32_le(self.x);
5847        __tmp.put_f32_le(self.y);
5848        __tmp.put_f32_le(self.z);
5849        if matches!(version, MavlinkVersion::V2) {
5850            for val in &self.covariance {
5851                __tmp.put_f32_le(*val);
5852            }
5853            let len = __tmp.len();
5854            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5855        } else {
5856            __tmp.len()
5857        }
5858    }
5859}
5860#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
5861#[doc = ""]
5862#[doc = "ID: 7"]
5863#[derive(Debug, Clone, PartialEq)]
5864#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5865#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5866#[cfg_attr(feature = "ts", derive(TS))]
5867#[cfg_attr(feature = "ts", ts(export))]
5868pub struct AUTH_KEY_DATA {
5869    #[doc = "key"]
5870    #[cfg_attr(feature = "ts", ts(type = "string"))]
5871    pub key: CharArray<32>,
5872}
5873impl AUTH_KEY_DATA {
5874    pub const ENCODED_LEN: usize = 32usize;
5875    pub const DEFAULT: Self = Self {
5876        key: CharArray::new([0_u8; 32usize]),
5877    };
5878    #[cfg(feature = "arbitrary")]
5879    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5880        use arbitrary::{Arbitrary, Unstructured};
5881        let mut buf = [0u8; 1024];
5882        rng.fill_bytes(&mut buf);
5883        let mut unstructured = Unstructured::new(&buf);
5884        Self::arbitrary(&mut unstructured).unwrap_or_default()
5885    }
5886}
5887impl Default for AUTH_KEY_DATA {
5888    fn default() -> Self {
5889        Self::DEFAULT.clone()
5890    }
5891}
5892impl MessageData for AUTH_KEY_DATA {
5893    type Message = MavMessage;
5894    const ID: u32 = 7u32;
5895    const NAME: &'static str = "AUTH_KEY";
5896    const EXTRA_CRC: u8 = 119u8;
5897    const ENCODED_LEN: usize = 32usize;
5898    fn deser(
5899        _version: MavlinkVersion,
5900        __input: &[u8],
5901    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5902        let avail_len = __input.len();
5903        let mut payload_buf = [0; Self::ENCODED_LEN];
5904        let mut buf = if avail_len < Self::ENCODED_LEN {
5905            payload_buf[0..avail_len].copy_from_slice(__input);
5906            Bytes::new(&payload_buf)
5907        } else {
5908            Bytes::new(__input)
5909        };
5910        let mut __struct = Self::default();
5911        let mut tmp = [0_u8; 32usize];
5912        for v in &mut tmp {
5913            *v = buf.get_u8()?;
5914        }
5915        __struct.key = CharArray::new(tmp);
5916        Ok(__struct)
5917    }
5918    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5919        let mut __tmp = BytesMut::new(bytes);
5920        #[allow(clippy::absurd_extreme_comparisons)]
5921        #[allow(unused_comparisons)]
5922        if __tmp.remaining() < Self::ENCODED_LEN {
5923            panic!(
5924                "buffer is too small (need {} bytes, but got {})",
5925                Self::ENCODED_LEN,
5926                __tmp.remaining(),
5927            )
5928        }
5929        for val in &self.key {
5930            __tmp.put_u8(*val);
5931        }
5932        if matches!(version, MavlinkVersion::V2) {
5933            let len = __tmp.len();
5934            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5935        } else {
5936            __tmp.len()
5937        }
5938    }
5939}
5940#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
5941#[doc = ""]
5942#[doc = "ID: 286"]
5943#[derive(Debug, Clone, PartialEq)]
5944#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5945#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5946#[cfg_attr(feature = "ts", derive(TS))]
5947#[cfg_attr(feature = "ts", ts(export))]
5948pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5949    #[doc = "Timestamp (time since system boot)."]
5950    pub time_boot_us: u64,
5951    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
5952    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5953    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5954    pub q: [f32; 4],
5955    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
5956    pub q_estimated_delay_us: u32,
5957    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
5958    pub vx: f32,
5959    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
5960    pub vy: f32,
5961    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
5962    pub vz: f32,
5963    #[doc = "Estimated delay of the speed data. 0 if unknown."]
5964    pub v_estimated_delay_us: u32,
5965    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
5966    pub feed_forward_angular_velocity_z: f32,
5967    #[doc = "Bitmap indicating which estimator outputs are valid."]
5968    pub estimator_status: EstimatorStatusFlags,
5969    #[doc = "System ID"]
5970    pub target_system: u8,
5971    #[doc = "Component ID"]
5972    pub target_component: u8,
5973    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
5974    pub landed_state: MavLandedState,
5975    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
5976    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5977    pub angular_velocity_z: f32,
5978}
5979impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5980    pub const ENCODED_LEN: usize = 57usize;
5981    pub const DEFAULT: Self = Self {
5982        time_boot_us: 0_u64,
5983        q: [0.0_f32; 4usize],
5984        q_estimated_delay_us: 0_u32,
5985        vx: 0.0_f32,
5986        vy: 0.0_f32,
5987        vz: 0.0_f32,
5988        v_estimated_delay_us: 0_u32,
5989        feed_forward_angular_velocity_z: 0.0_f32,
5990        estimator_status: EstimatorStatusFlags::DEFAULT,
5991        target_system: 0_u8,
5992        target_component: 0_u8,
5993        landed_state: MavLandedState::DEFAULT,
5994        angular_velocity_z: 0.0_f32,
5995    };
5996    #[cfg(feature = "arbitrary")]
5997    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5998        use arbitrary::{Arbitrary, Unstructured};
5999        let mut buf = [0u8; 1024];
6000        rng.fill_bytes(&mut buf);
6001        let mut unstructured = Unstructured::new(&buf);
6002        Self::arbitrary(&mut unstructured).unwrap_or_default()
6003    }
6004}
6005impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6006    fn default() -> Self {
6007        Self::DEFAULT.clone()
6008    }
6009}
6010impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6011    type Message = MavMessage;
6012    const ID: u32 = 286u32;
6013    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6014    const EXTRA_CRC: u8 = 210u8;
6015    const ENCODED_LEN: usize = 57usize;
6016    fn deser(
6017        _version: MavlinkVersion,
6018        __input: &[u8],
6019    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6020        let avail_len = __input.len();
6021        let mut payload_buf = [0; Self::ENCODED_LEN];
6022        let mut buf = if avail_len < Self::ENCODED_LEN {
6023            payload_buf[0..avail_len].copy_from_slice(__input);
6024            Bytes::new(&payload_buf)
6025        } else {
6026            Bytes::new(__input)
6027        };
6028        let mut __struct = Self::default();
6029        __struct.time_boot_us = buf.get_u64_le()?;
6030        for v in &mut __struct.q {
6031            let val = buf.get_f32_le()?;
6032            *v = val;
6033        }
6034        __struct.q_estimated_delay_us = buf.get_u32_le()?;
6035        __struct.vx = buf.get_f32_le()?;
6036        __struct.vy = buf.get_f32_le()?;
6037        __struct.vz = buf.get_f32_le()?;
6038        __struct.v_estimated_delay_us = buf.get_u32_le()?;
6039        __struct.feed_forward_angular_velocity_z = buf.get_f32_le()?;
6040        let tmp = buf.get_u16_le()?;
6041        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6042            tmp as <EstimatorStatusFlags as Flags>::Bits,
6043        )
6044        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6045            flag_type: "EstimatorStatusFlags",
6046            value: tmp as u64,
6047        })?;
6048        __struct.target_system = buf.get_u8()?;
6049        __struct.target_component = buf.get_u8()?;
6050        let tmp = buf.get_u8()?;
6051        __struct.landed_state =
6052            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6053                enum_type: "MavLandedState",
6054                value: tmp as u64,
6055            })?;
6056        __struct.angular_velocity_z = buf.get_f32_le()?;
6057        Ok(__struct)
6058    }
6059    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6060        let mut __tmp = BytesMut::new(bytes);
6061        #[allow(clippy::absurd_extreme_comparisons)]
6062        #[allow(unused_comparisons)]
6063        if __tmp.remaining() < Self::ENCODED_LEN {
6064            panic!(
6065                "buffer is too small (need {} bytes, but got {})",
6066                Self::ENCODED_LEN,
6067                __tmp.remaining(),
6068            )
6069        }
6070        __tmp.put_u64_le(self.time_boot_us);
6071        for val in &self.q {
6072            __tmp.put_f32_le(*val);
6073        }
6074        __tmp.put_u32_le(self.q_estimated_delay_us);
6075        __tmp.put_f32_le(self.vx);
6076        __tmp.put_f32_le(self.vy);
6077        __tmp.put_f32_le(self.vz);
6078        __tmp.put_u32_le(self.v_estimated_delay_us);
6079        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6080        __tmp.put_u16_le(self.estimator_status.bits() as u16);
6081        __tmp.put_u8(self.target_system);
6082        __tmp.put_u8(self.target_component);
6083        __tmp.put_u8(self.landed_state as u8);
6084        if matches!(version, MavlinkVersion::V2) {
6085            __tmp.put_f32_le(self.angular_velocity_z);
6086            let len = __tmp.len();
6087            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6088        } else {
6089            __tmp.len()
6090        }
6091    }
6092}
6093#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6094#[doc = ""]
6095#[doc = "ID: 148"]
6096#[derive(Debug, Clone, PartialEq)]
6097#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6098#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6099#[cfg_attr(feature = "ts", derive(TS))]
6100#[cfg_attr(feature = "ts", ts(export))]
6101pub struct AUTOPILOT_VERSION_DATA {
6102    #[doc = "Bitmap of capabilities"]
6103    pub capabilities: MavProtocolCapability,
6104    #[doc = "UID if provided by hardware (see uid2)"]
6105    pub uid: u64,
6106    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6107    pub flight_sw_version: u32,
6108    #[doc = "Middleware version number"]
6109    pub middleware_sw_version: u32,
6110    #[doc = "Operating system version number"]
6111    pub os_sw_version: u32,
6112    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6113    pub board_version: u32,
6114    #[doc = "ID of the board vendor"]
6115    pub vendor_id: u16,
6116    #[doc = "ID of the product"]
6117    pub product_id: u16,
6118    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6119    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6120    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6121    pub flight_custom_version: [u8; 8],
6122    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6123    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6124    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6125    pub middleware_custom_version: [u8; 8],
6126    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6127    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6128    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6129    pub os_custom_version: [u8; 8],
6130    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6131    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6132    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6133    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6134    pub uid2: [u8; 18],
6135}
6136impl AUTOPILOT_VERSION_DATA {
6137    pub const ENCODED_LEN: usize = 78usize;
6138    pub const DEFAULT: Self = Self {
6139        capabilities: MavProtocolCapability::DEFAULT,
6140        uid: 0_u64,
6141        flight_sw_version: 0_u32,
6142        middleware_sw_version: 0_u32,
6143        os_sw_version: 0_u32,
6144        board_version: 0_u32,
6145        vendor_id: 0_u16,
6146        product_id: 0_u16,
6147        flight_custom_version: [0_u8; 8usize],
6148        middleware_custom_version: [0_u8; 8usize],
6149        os_custom_version: [0_u8; 8usize],
6150        uid2: [0_u8; 18usize],
6151    };
6152    #[cfg(feature = "arbitrary")]
6153    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6154        use arbitrary::{Arbitrary, Unstructured};
6155        let mut buf = [0u8; 1024];
6156        rng.fill_bytes(&mut buf);
6157        let mut unstructured = Unstructured::new(&buf);
6158        Self::arbitrary(&mut unstructured).unwrap_or_default()
6159    }
6160}
6161impl Default for AUTOPILOT_VERSION_DATA {
6162    fn default() -> Self {
6163        Self::DEFAULT.clone()
6164    }
6165}
6166impl MessageData for AUTOPILOT_VERSION_DATA {
6167    type Message = MavMessage;
6168    const ID: u32 = 148u32;
6169    const NAME: &'static str = "AUTOPILOT_VERSION";
6170    const EXTRA_CRC: u8 = 178u8;
6171    const ENCODED_LEN: usize = 78usize;
6172    fn deser(
6173        _version: MavlinkVersion,
6174        __input: &[u8],
6175    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6176        let avail_len = __input.len();
6177        let mut payload_buf = [0; Self::ENCODED_LEN];
6178        let mut buf = if avail_len < Self::ENCODED_LEN {
6179            payload_buf[0..avail_len].copy_from_slice(__input);
6180            Bytes::new(&payload_buf)
6181        } else {
6182            Bytes::new(__input)
6183        };
6184        let mut __struct = Self::default();
6185        let tmp = buf.get_u64_le()?;
6186        __struct.capabilities = MavProtocolCapability::from_bits(
6187            tmp as <MavProtocolCapability as Flags>::Bits,
6188        )
6189        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6190            flag_type: "MavProtocolCapability",
6191            value: tmp as u64,
6192        })?;
6193        __struct.uid = buf.get_u64_le()?;
6194        __struct.flight_sw_version = buf.get_u32_le()?;
6195        __struct.middleware_sw_version = buf.get_u32_le()?;
6196        __struct.os_sw_version = buf.get_u32_le()?;
6197        __struct.board_version = buf.get_u32_le()?;
6198        __struct.vendor_id = buf.get_u16_le()?;
6199        __struct.product_id = buf.get_u16_le()?;
6200        for v in &mut __struct.flight_custom_version {
6201            let val = buf.get_u8()?;
6202            *v = val;
6203        }
6204        for v in &mut __struct.middleware_custom_version {
6205            let val = buf.get_u8()?;
6206            *v = val;
6207        }
6208        for v in &mut __struct.os_custom_version {
6209            let val = buf.get_u8()?;
6210            *v = val;
6211        }
6212        for v in &mut __struct.uid2 {
6213            let val = buf.get_u8()?;
6214            *v = val;
6215        }
6216        Ok(__struct)
6217    }
6218    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6219        let mut __tmp = BytesMut::new(bytes);
6220        #[allow(clippy::absurd_extreme_comparisons)]
6221        #[allow(unused_comparisons)]
6222        if __tmp.remaining() < Self::ENCODED_LEN {
6223            panic!(
6224                "buffer is too small (need {} bytes, but got {})",
6225                Self::ENCODED_LEN,
6226                __tmp.remaining(),
6227            )
6228        }
6229        __tmp.put_u64_le(self.capabilities.bits() as u64);
6230        __tmp.put_u64_le(self.uid);
6231        __tmp.put_u32_le(self.flight_sw_version);
6232        __tmp.put_u32_le(self.middleware_sw_version);
6233        __tmp.put_u32_le(self.os_sw_version);
6234        __tmp.put_u32_le(self.board_version);
6235        __tmp.put_u16_le(self.vendor_id);
6236        __tmp.put_u16_le(self.product_id);
6237        for val in &self.flight_custom_version {
6238            __tmp.put_u8(*val);
6239        }
6240        for val in &self.middleware_custom_version {
6241            __tmp.put_u8(*val);
6242        }
6243        for val in &self.os_custom_version {
6244            __tmp.put_u8(*val);
6245        }
6246        if matches!(version, MavlinkVersion::V2) {
6247            for val in &self.uid2 {
6248                __tmp.put_u8(*val);
6249            }
6250            let len = __tmp.len();
6251            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6252        } else {
6253            __tmp.len()
6254        }
6255    }
6256}
6257#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6258#[doc = ""]
6259#[doc = "ID: 435"]
6260#[derive(Debug, Clone, PartialEq)]
6261#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6262#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6263#[cfg_attr(feature = "ts", derive(TS))]
6264#[cfg_attr(feature = "ts", ts(export))]
6265pub struct AVAILABLE_MODES_DATA {
6266    #[doc = "A bitfield for use for autopilot-specific flags"]
6267    pub custom_mode: u32,
6268    #[doc = "Mode properties."]
6269    pub properties: MavModeProperty,
6270    #[doc = "The total number of available modes for the current vehicle type."]
6271    pub number_modes: u8,
6272    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6273    pub mode_index: u8,
6274    #[doc = "Standard mode."]
6275    pub standard_mode: MavStandardMode,
6276    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6277    #[cfg_attr(feature = "ts", ts(type = "string"))]
6278    pub mode_name: CharArray<35>,
6279}
6280impl AVAILABLE_MODES_DATA {
6281    pub const ENCODED_LEN: usize = 46usize;
6282    pub const DEFAULT: Self = Self {
6283        custom_mode: 0_u32,
6284        properties: MavModeProperty::DEFAULT,
6285        number_modes: 0_u8,
6286        mode_index: 0_u8,
6287        standard_mode: MavStandardMode::DEFAULT,
6288        mode_name: CharArray::new([0_u8; 35usize]),
6289    };
6290    #[cfg(feature = "arbitrary")]
6291    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6292        use arbitrary::{Arbitrary, Unstructured};
6293        let mut buf = [0u8; 1024];
6294        rng.fill_bytes(&mut buf);
6295        let mut unstructured = Unstructured::new(&buf);
6296        Self::arbitrary(&mut unstructured).unwrap_or_default()
6297    }
6298}
6299impl Default for AVAILABLE_MODES_DATA {
6300    fn default() -> Self {
6301        Self::DEFAULT.clone()
6302    }
6303}
6304impl MessageData for AVAILABLE_MODES_DATA {
6305    type Message = MavMessage;
6306    const ID: u32 = 435u32;
6307    const NAME: &'static str = "AVAILABLE_MODES";
6308    const EXTRA_CRC: u8 = 134u8;
6309    const ENCODED_LEN: usize = 46usize;
6310    fn deser(
6311        _version: MavlinkVersion,
6312        __input: &[u8],
6313    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6314        let avail_len = __input.len();
6315        let mut payload_buf = [0; Self::ENCODED_LEN];
6316        let mut buf = if avail_len < Self::ENCODED_LEN {
6317            payload_buf[0..avail_len].copy_from_slice(__input);
6318            Bytes::new(&payload_buf)
6319        } else {
6320            Bytes::new(__input)
6321        };
6322        let mut __struct = Self::default();
6323        __struct.custom_mode = buf.get_u32_le()?;
6324        let tmp = buf.get_u32_le()?;
6325        __struct.properties = MavModeProperty::from_bits(tmp as <MavModeProperty as Flags>::Bits)
6326            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6327            flag_type: "MavModeProperty",
6328            value: tmp as u64,
6329        })?;
6330        __struct.number_modes = buf.get_u8()?;
6331        __struct.mode_index = buf.get_u8()?;
6332        let tmp = buf.get_u8()?;
6333        __struct.standard_mode =
6334            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6335                enum_type: "MavStandardMode",
6336                value: tmp as u64,
6337            })?;
6338        let mut tmp = [0_u8; 35usize];
6339        for v in &mut tmp {
6340            *v = buf.get_u8()?;
6341        }
6342        __struct.mode_name = CharArray::new(tmp);
6343        Ok(__struct)
6344    }
6345    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6346        let mut __tmp = BytesMut::new(bytes);
6347        #[allow(clippy::absurd_extreme_comparisons)]
6348        #[allow(unused_comparisons)]
6349        if __tmp.remaining() < Self::ENCODED_LEN {
6350            panic!(
6351                "buffer is too small (need {} bytes, but got {})",
6352                Self::ENCODED_LEN,
6353                __tmp.remaining(),
6354            )
6355        }
6356        __tmp.put_u32_le(self.custom_mode);
6357        __tmp.put_u32_le(self.properties.bits() as u32);
6358        __tmp.put_u8(self.number_modes);
6359        __tmp.put_u8(self.mode_index);
6360        __tmp.put_u8(self.standard_mode as u8);
6361        for val in &self.mode_name {
6362            __tmp.put_u8(*val);
6363        }
6364        if matches!(version, MavlinkVersion::V2) {
6365            let len = __tmp.len();
6366            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6367        } else {
6368            __tmp.len()
6369        }
6370    }
6371}
6372#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6373#[doc = ""]
6374#[doc = "ID: 437"]
6375#[derive(Debug, Clone, PartialEq)]
6376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6377#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6378#[cfg_attr(feature = "ts", derive(TS))]
6379#[cfg_attr(feature = "ts", ts(export))]
6380pub struct AVAILABLE_MODES_MONITOR_DATA {
6381    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6382    pub seq: u8,
6383}
6384impl AVAILABLE_MODES_MONITOR_DATA {
6385    pub const ENCODED_LEN: usize = 1usize;
6386    pub const DEFAULT: Self = Self { seq: 0_u8 };
6387    #[cfg(feature = "arbitrary")]
6388    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6389        use arbitrary::{Arbitrary, Unstructured};
6390        let mut buf = [0u8; 1024];
6391        rng.fill_bytes(&mut buf);
6392        let mut unstructured = Unstructured::new(&buf);
6393        Self::arbitrary(&mut unstructured).unwrap_or_default()
6394    }
6395}
6396impl Default for AVAILABLE_MODES_MONITOR_DATA {
6397    fn default() -> Self {
6398        Self::DEFAULT.clone()
6399    }
6400}
6401impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6402    type Message = MavMessage;
6403    const ID: u32 = 437u32;
6404    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6405    const EXTRA_CRC: u8 = 30u8;
6406    const ENCODED_LEN: usize = 1usize;
6407    fn deser(
6408        _version: MavlinkVersion,
6409        __input: &[u8],
6410    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6411        let avail_len = __input.len();
6412        let mut payload_buf = [0; Self::ENCODED_LEN];
6413        let mut buf = if avail_len < Self::ENCODED_LEN {
6414            payload_buf[0..avail_len].copy_from_slice(__input);
6415            Bytes::new(&payload_buf)
6416        } else {
6417            Bytes::new(__input)
6418        };
6419        let mut __struct = Self::default();
6420        __struct.seq = buf.get_u8()?;
6421        Ok(__struct)
6422    }
6423    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6424        let mut __tmp = BytesMut::new(bytes);
6425        #[allow(clippy::absurd_extreme_comparisons)]
6426        #[allow(unused_comparisons)]
6427        if __tmp.remaining() < Self::ENCODED_LEN {
6428            panic!(
6429                "buffer is too small (need {} bytes, but got {})",
6430                Self::ENCODED_LEN,
6431                __tmp.remaining(),
6432            )
6433        }
6434        __tmp.put_u8(self.seq);
6435        if matches!(version, MavlinkVersion::V2) {
6436            let len = __tmp.len();
6437            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6438        } else {
6439            __tmp.len()
6440        }
6441    }
6442}
6443#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6444#[doc = ""]
6445#[doc = "ID: 372"]
6446#[derive(Debug, Clone, PartialEq)]
6447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6448#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6449#[cfg_attr(feature = "ts", derive(TS))]
6450#[cfg_attr(feature = "ts", ts(export))]
6451pub struct BATTERY_INFO_DATA {
6452    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6453    pub discharge_minimum_voltage: f32,
6454    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6455    pub charging_minimum_voltage: f32,
6456    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6457    pub resting_minimum_voltage: f32,
6458    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6459    pub charging_maximum_voltage: f32,
6460    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6461    pub charging_maximum_current: f32,
6462    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6463    pub nominal_voltage: f32,
6464    #[doc = "Maximum pack discharge current. 0: field not provided."]
6465    pub discharge_maximum_current: f32,
6466    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6467    pub discharge_maximum_burst_current: f32,
6468    #[doc = "Fully charged design capacity. 0: field not provided."]
6469    pub design_capacity: f32,
6470    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6471    pub full_charge_capacity: f32,
6472    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6473    pub cycle_count: u16,
6474    #[doc = "Battery weight. 0: field not provided."]
6475    pub weight: u16,
6476    #[doc = "Battery ID"]
6477    pub id: u8,
6478    #[doc = "Function of the battery."]
6479    pub battery_function: MavBatteryFunction,
6480    #[doc = "Type (chemistry) of the battery."]
6481    pub mavtype: MavBatteryType,
6482    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6483    pub state_of_health: u8,
6484    #[doc = "Number of battery cells in series. 0: field not provided."]
6485    pub cells_in_series: u8,
6486    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6487    #[cfg_attr(feature = "ts", ts(type = "string"))]
6488    pub manufacture_date: CharArray<9>,
6489    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6490    #[cfg_attr(feature = "ts", ts(type = "string"))]
6491    pub serial_number: CharArray<32>,
6492    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6493    #[cfg_attr(feature = "ts", ts(type = "string"))]
6494    pub name: CharArray<50>,
6495}
6496impl BATTERY_INFO_DATA {
6497    pub const ENCODED_LEN: usize = 140usize;
6498    pub const DEFAULT: Self = Self {
6499        discharge_minimum_voltage: 0.0_f32,
6500        charging_minimum_voltage: 0.0_f32,
6501        resting_minimum_voltage: 0.0_f32,
6502        charging_maximum_voltage: 0.0_f32,
6503        charging_maximum_current: 0.0_f32,
6504        nominal_voltage: 0.0_f32,
6505        discharge_maximum_current: 0.0_f32,
6506        discharge_maximum_burst_current: 0.0_f32,
6507        design_capacity: 0.0_f32,
6508        full_charge_capacity: 0.0_f32,
6509        cycle_count: 0_u16,
6510        weight: 0_u16,
6511        id: 0_u8,
6512        battery_function: MavBatteryFunction::DEFAULT,
6513        mavtype: MavBatteryType::DEFAULT,
6514        state_of_health: 0_u8,
6515        cells_in_series: 0_u8,
6516        manufacture_date: CharArray::new([0_u8; 9usize]),
6517        serial_number: CharArray::new([0_u8; 32usize]),
6518        name: CharArray::new([0_u8; 50usize]),
6519    };
6520    #[cfg(feature = "arbitrary")]
6521    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6522        use arbitrary::{Arbitrary, Unstructured};
6523        let mut buf = [0u8; 1024];
6524        rng.fill_bytes(&mut buf);
6525        let mut unstructured = Unstructured::new(&buf);
6526        Self::arbitrary(&mut unstructured).unwrap_or_default()
6527    }
6528}
6529impl Default for BATTERY_INFO_DATA {
6530    fn default() -> Self {
6531        Self::DEFAULT.clone()
6532    }
6533}
6534impl MessageData for BATTERY_INFO_DATA {
6535    type Message = MavMessage;
6536    const ID: u32 = 372u32;
6537    const NAME: &'static str = "BATTERY_INFO";
6538    const EXTRA_CRC: u8 = 26u8;
6539    const ENCODED_LEN: usize = 140usize;
6540    fn deser(
6541        _version: MavlinkVersion,
6542        __input: &[u8],
6543    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6544        let avail_len = __input.len();
6545        let mut payload_buf = [0; Self::ENCODED_LEN];
6546        let mut buf = if avail_len < Self::ENCODED_LEN {
6547            payload_buf[0..avail_len].copy_from_slice(__input);
6548            Bytes::new(&payload_buf)
6549        } else {
6550            Bytes::new(__input)
6551        };
6552        let mut __struct = Self::default();
6553        __struct.discharge_minimum_voltage = buf.get_f32_le()?;
6554        __struct.charging_minimum_voltage = buf.get_f32_le()?;
6555        __struct.resting_minimum_voltage = buf.get_f32_le()?;
6556        __struct.charging_maximum_voltage = buf.get_f32_le()?;
6557        __struct.charging_maximum_current = buf.get_f32_le()?;
6558        __struct.nominal_voltage = buf.get_f32_le()?;
6559        __struct.discharge_maximum_current = buf.get_f32_le()?;
6560        __struct.discharge_maximum_burst_current = buf.get_f32_le()?;
6561        __struct.design_capacity = buf.get_f32_le()?;
6562        __struct.full_charge_capacity = buf.get_f32_le()?;
6563        __struct.cycle_count = buf.get_u16_le()?;
6564        __struct.weight = buf.get_u16_le()?;
6565        __struct.id = buf.get_u8()?;
6566        let tmp = buf.get_u8()?;
6567        __struct.battery_function =
6568            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6569                enum_type: "MavBatteryFunction",
6570                value: tmp as u64,
6571            })?;
6572        let tmp = buf.get_u8()?;
6573        __struct.mavtype =
6574            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6575                enum_type: "MavBatteryType",
6576                value: tmp as u64,
6577            })?;
6578        __struct.state_of_health = buf.get_u8()?;
6579        __struct.cells_in_series = buf.get_u8()?;
6580        let mut tmp = [0_u8; 9usize];
6581        for v in &mut tmp {
6582            *v = buf.get_u8()?;
6583        }
6584        __struct.manufacture_date = CharArray::new(tmp);
6585        let mut tmp = [0_u8; 32usize];
6586        for v in &mut tmp {
6587            *v = buf.get_u8()?;
6588        }
6589        __struct.serial_number = CharArray::new(tmp);
6590        let mut tmp = [0_u8; 50usize];
6591        for v in &mut tmp {
6592            *v = buf.get_u8()?;
6593        }
6594        __struct.name = CharArray::new(tmp);
6595        Ok(__struct)
6596    }
6597    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6598        let mut __tmp = BytesMut::new(bytes);
6599        #[allow(clippy::absurd_extreme_comparisons)]
6600        #[allow(unused_comparisons)]
6601        if __tmp.remaining() < Self::ENCODED_LEN {
6602            panic!(
6603                "buffer is too small (need {} bytes, but got {})",
6604                Self::ENCODED_LEN,
6605                __tmp.remaining(),
6606            )
6607        }
6608        __tmp.put_f32_le(self.discharge_minimum_voltage);
6609        __tmp.put_f32_le(self.charging_minimum_voltage);
6610        __tmp.put_f32_le(self.resting_minimum_voltage);
6611        __tmp.put_f32_le(self.charging_maximum_voltage);
6612        __tmp.put_f32_le(self.charging_maximum_current);
6613        __tmp.put_f32_le(self.nominal_voltage);
6614        __tmp.put_f32_le(self.discharge_maximum_current);
6615        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6616        __tmp.put_f32_le(self.design_capacity);
6617        __tmp.put_f32_le(self.full_charge_capacity);
6618        __tmp.put_u16_le(self.cycle_count);
6619        __tmp.put_u16_le(self.weight);
6620        __tmp.put_u8(self.id);
6621        __tmp.put_u8(self.battery_function as u8);
6622        __tmp.put_u8(self.mavtype as u8);
6623        __tmp.put_u8(self.state_of_health);
6624        __tmp.put_u8(self.cells_in_series);
6625        for val in &self.manufacture_date {
6626            __tmp.put_u8(*val);
6627        }
6628        for val in &self.serial_number {
6629            __tmp.put_u8(*val);
6630        }
6631        for val in &self.name {
6632            __tmp.put_u8(*val);
6633        }
6634        if matches!(version, MavlinkVersion::V2) {
6635            let len = __tmp.len();
6636            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6637        } else {
6638            __tmp.len()
6639        }
6640    }
6641}
6642#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6643#[doc = ""]
6644#[doc = "ID: 147"]
6645#[derive(Debug, Clone, PartialEq)]
6646#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6647#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6648#[cfg_attr(feature = "ts", derive(TS))]
6649#[cfg_attr(feature = "ts", ts(export))]
6650pub struct BATTERY_STATUS_DATA {
6651    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6652    pub current_consumed: i32,
6653    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6654    pub energy_consumed: i32,
6655    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6656    pub temperature: i16,
6657    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6658    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6659    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6660    pub voltages: [u16; 10],
6661    #[doc = "Battery current, -1: autopilot does not measure the current"]
6662    pub current_battery: i16,
6663    #[doc = "Battery ID"]
6664    pub id: u8,
6665    #[doc = "Function of the battery"]
6666    pub battery_function: MavBatteryFunction,
6667    #[doc = "Type (chemistry) of the battery"]
6668    pub mavtype: MavBatteryType,
6669    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6670    pub battery_remaining: i8,
6671    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6672    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6673    pub time_remaining: i32,
6674    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6675    #[cfg_attr(feature = "serde", serde(default))]
6676    pub charge_state: MavBatteryChargeState,
6677    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6678    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6679    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6680    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6681    pub voltages_ext: [u16; 4],
6682    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6683    #[cfg_attr(feature = "serde", serde(default))]
6684    pub mode: MavBatteryMode,
6685    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6686    #[cfg_attr(feature = "serde", serde(default))]
6687    pub fault_bitmask: MavBatteryFault,
6688}
6689impl BATTERY_STATUS_DATA {
6690    pub const ENCODED_LEN: usize = 54usize;
6691    pub const DEFAULT: Self = Self {
6692        current_consumed: 0_i32,
6693        energy_consumed: 0_i32,
6694        temperature: 0_i16,
6695        voltages: [0_u16; 10usize],
6696        current_battery: 0_i16,
6697        id: 0_u8,
6698        battery_function: MavBatteryFunction::DEFAULT,
6699        mavtype: MavBatteryType::DEFAULT,
6700        battery_remaining: 0_i8,
6701        time_remaining: 0_i32,
6702        charge_state: MavBatteryChargeState::DEFAULT,
6703        voltages_ext: [0_u16; 4usize],
6704        mode: MavBatteryMode::DEFAULT,
6705        fault_bitmask: MavBatteryFault::DEFAULT,
6706    };
6707    #[cfg(feature = "arbitrary")]
6708    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6709        use arbitrary::{Arbitrary, Unstructured};
6710        let mut buf = [0u8; 1024];
6711        rng.fill_bytes(&mut buf);
6712        let mut unstructured = Unstructured::new(&buf);
6713        Self::arbitrary(&mut unstructured).unwrap_or_default()
6714    }
6715}
6716impl Default for BATTERY_STATUS_DATA {
6717    fn default() -> Self {
6718        Self::DEFAULT.clone()
6719    }
6720}
6721impl MessageData for BATTERY_STATUS_DATA {
6722    type Message = MavMessage;
6723    const ID: u32 = 147u32;
6724    const NAME: &'static str = "BATTERY_STATUS";
6725    const EXTRA_CRC: u8 = 154u8;
6726    const ENCODED_LEN: usize = 54usize;
6727    fn deser(
6728        _version: MavlinkVersion,
6729        __input: &[u8],
6730    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6731        let avail_len = __input.len();
6732        let mut payload_buf = [0; Self::ENCODED_LEN];
6733        let mut buf = if avail_len < Self::ENCODED_LEN {
6734            payload_buf[0..avail_len].copy_from_slice(__input);
6735            Bytes::new(&payload_buf)
6736        } else {
6737            Bytes::new(__input)
6738        };
6739        let mut __struct = Self::default();
6740        __struct.current_consumed = buf.get_i32_le()?;
6741        __struct.energy_consumed = buf.get_i32_le()?;
6742        __struct.temperature = buf.get_i16_le()?;
6743        for v in &mut __struct.voltages {
6744            let val = buf.get_u16_le()?;
6745            *v = val;
6746        }
6747        __struct.current_battery = buf.get_i16_le()?;
6748        __struct.id = buf.get_u8()?;
6749        let tmp = buf.get_u8()?;
6750        __struct.battery_function =
6751            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6752                enum_type: "MavBatteryFunction",
6753                value: tmp as u64,
6754            })?;
6755        let tmp = buf.get_u8()?;
6756        __struct.mavtype =
6757            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6758                enum_type: "MavBatteryType",
6759                value: tmp as u64,
6760            })?;
6761        __struct.battery_remaining = buf.get_i8()?;
6762        __struct.time_remaining = buf.get_i32_le()?;
6763        let tmp = buf.get_u8()?;
6764        __struct.charge_state =
6765            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6766                enum_type: "MavBatteryChargeState",
6767                value: tmp as u64,
6768            })?;
6769        for v in &mut __struct.voltages_ext {
6770            let val = buf.get_u16_le()?;
6771            *v = val;
6772        }
6773        let tmp = buf.get_u8()?;
6774        __struct.mode =
6775            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6776                enum_type: "MavBatteryMode",
6777                value: tmp as u64,
6778            })?;
6779        let tmp = buf.get_u32_le()?;
6780        __struct.fault_bitmask = MavBatteryFault::from_bits(
6781            tmp as <MavBatteryFault as Flags>::Bits,
6782        )
6783        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6784            flag_type: "MavBatteryFault",
6785            value: tmp as u64,
6786        })?;
6787        Ok(__struct)
6788    }
6789    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6790        let mut __tmp = BytesMut::new(bytes);
6791        #[allow(clippy::absurd_extreme_comparisons)]
6792        #[allow(unused_comparisons)]
6793        if __tmp.remaining() < Self::ENCODED_LEN {
6794            panic!(
6795                "buffer is too small (need {} bytes, but got {})",
6796                Self::ENCODED_LEN,
6797                __tmp.remaining(),
6798            )
6799        }
6800        __tmp.put_i32_le(self.current_consumed);
6801        __tmp.put_i32_le(self.energy_consumed);
6802        __tmp.put_i16_le(self.temperature);
6803        for val in &self.voltages {
6804            __tmp.put_u16_le(*val);
6805        }
6806        __tmp.put_i16_le(self.current_battery);
6807        __tmp.put_u8(self.id);
6808        __tmp.put_u8(self.battery_function as u8);
6809        __tmp.put_u8(self.mavtype as u8);
6810        __tmp.put_i8(self.battery_remaining);
6811        if matches!(version, MavlinkVersion::V2) {
6812            __tmp.put_i32_le(self.time_remaining);
6813            __tmp.put_u8(self.charge_state as u8);
6814            for val in &self.voltages_ext {
6815                __tmp.put_u16_le(*val);
6816            }
6817            __tmp.put_u8(self.mode as u8);
6818            __tmp.put_u32_le(self.fault_bitmask.bits() as u32);
6819            let len = __tmp.len();
6820            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6821        } else {
6822            __tmp.len()
6823        }
6824    }
6825}
6826#[doc = "Report button state change."]
6827#[doc = ""]
6828#[doc = "ID: 257"]
6829#[derive(Debug, Clone, PartialEq)]
6830#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6831#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6832#[cfg_attr(feature = "ts", derive(TS))]
6833#[cfg_attr(feature = "ts", ts(export))]
6834pub struct BUTTON_CHANGE_DATA {
6835    #[doc = "Timestamp (time since system boot)."]
6836    pub time_boot_ms: u32,
6837    #[doc = "Time of last change of button state."]
6838    pub last_change_ms: u32,
6839    #[doc = "Bitmap for state of buttons."]
6840    pub state: u8,
6841}
6842impl BUTTON_CHANGE_DATA {
6843    pub const ENCODED_LEN: usize = 9usize;
6844    pub const DEFAULT: Self = Self {
6845        time_boot_ms: 0_u32,
6846        last_change_ms: 0_u32,
6847        state: 0_u8,
6848    };
6849    #[cfg(feature = "arbitrary")]
6850    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6851        use arbitrary::{Arbitrary, Unstructured};
6852        let mut buf = [0u8; 1024];
6853        rng.fill_bytes(&mut buf);
6854        let mut unstructured = Unstructured::new(&buf);
6855        Self::arbitrary(&mut unstructured).unwrap_or_default()
6856    }
6857}
6858impl Default for BUTTON_CHANGE_DATA {
6859    fn default() -> Self {
6860        Self::DEFAULT.clone()
6861    }
6862}
6863impl MessageData for BUTTON_CHANGE_DATA {
6864    type Message = MavMessage;
6865    const ID: u32 = 257u32;
6866    const NAME: &'static str = "BUTTON_CHANGE";
6867    const EXTRA_CRC: u8 = 131u8;
6868    const ENCODED_LEN: usize = 9usize;
6869    fn deser(
6870        _version: MavlinkVersion,
6871        __input: &[u8],
6872    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6873        let avail_len = __input.len();
6874        let mut payload_buf = [0; Self::ENCODED_LEN];
6875        let mut buf = if avail_len < Self::ENCODED_LEN {
6876            payload_buf[0..avail_len].copy_from_slice(__input);
6877            Bytes::new(&payload_buf)
6878        } else {
6879            Bytes::new(__input)
6880        };
6881        let mut __struct = Self::default();
6882        __struct.time_boot_ms = buf.get_u32_le()?;
6883        __struct.last_change_ms = buf.get_u32_le()?;
6884        __struct.state = buf.get_u8()?;
6885        Ok(__struct)
6886    }
6887    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6888        let mut __tmp = BytesMut::new(bytes);
6889        #[allow(clippy::absurd_extreme_comparisons)]
6890        #[allow(unused_comparisons)]
6891        if __tmp.remaining() < Self::ENCODED_LEN {
6892            panic!(
6893                "buffer is too small (need {} bytes, but got {})",
6894                Self::ENCODED_LEN,
6895                __tmp.remaining(),
6896            )
6897        }
6898        __tmp.put_u32_le(self.time_boot_ms);
6899        __tmp.put_u32_le(self.last_change_ms);
6900        __tmp.put_u8(self.state);
6901        if matches!(version, MavlinkVersion::V2) {
6902            let len = __tmp.len();
6903            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6904        } else {
6905            __tmp.len()
6906        }
6907    }
6908}
6909#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6910#[doc = ""]
6911#[doc = "ID: 262"]
6912#[derive(Debug, Clone, PartialEq)]
6913#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6914#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6915#[cfg_attr(feature = "ts", derive(TS))]
6916#[cfg_attr(feature = "ts", ts(export))]
6917pub struct CAMERA_CAPTURE_STATUS_DATA {
6918    #[doc = "Timestamp (time since system boot)."]
6919    pub time_boot_ms: u32,
6920    #[doc = "Image capture interval"]
6921    pub image_interval: f32,
6922    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
6923    pub recording_time_ms: u32,
6924    #[doc = "Available storage capacity."]
6925    pub available_capacity: f32,
6926    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
6927    pub image_status: u8,
6928    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
6929    pub video_status: u8,
6930    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
6931    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6932    pub image_count: i32,
6933    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
6934    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6935    pub camera_device_id: u8,
6936}
6937impl CAMERA_CAPTURE_STATUS_DATA {
6938    pub const ENCODED_LEN: usize = 23usize;
6939    pub const DEFAULT: Self = Self {
6940        time_boot_ms: 0_u32,
6941        image_interval: 0.0_f32,
6942        recording_time_ms: 0_u32,
6943        available_capacity: 0.0_f32,
6944        image_status: 0_u8,
6945        video_status: 0_u8,
6946        image_count: 0_i32,
6947        camera_device_id: 0_u8,
6948    };
6949    #[cfg(feature = "arbitrary")]
6950    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6951        use arbitrary::{Arbitrary, Unstructured};
6952        let mut buf = [0u8; 1024];
6953        rng.fill_bytes(&mut buf);
6954        let mut unstructured = Unstructured::new(&buf);
6955        Self::arbitrary(&mut unstructured).unwrap_or_default()
6956    }
6957}
6958impl Default for CAMERA_CAPTURE_STATUS_DATA {
6959    fn default() -> Self {
6960        Self::DEFAULT.clone()
6961    }
6962}
6963impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
6964    type Message = MavMessage;
6965    const ID: u32 = 262u32;
6966    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
6967    const EXTRA_CRC: u8 = 12u8;
6968    const ENCODED_LEN: usize = 23usize;
6969    fn deser(
6970        _version: MavlinkVersion,
6971        __input: &[u8],
6972    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6973        let avail_len = __input.len();
6974        let mut payload_buf = [0; Self::ENCODED_LEN];
6975        let mut buf = if avail_len < Self::ENCODED_LEN {
6976            payload_buf[0..avail_len].copy_from_slice(__input);
6977            Bytes::new(&payload_buf)
6978        } else {
6979            Bytes::new(__input)
6980        };
6981        let mut __struct = Self::default();
6982        __struct.time_boot_ms = buf.get_u32_le()?;
6983        __struct.image_interval = buf.get_f32_le()?;
6984        __struct.recording_time_ms = buf.get_u32_le()?;
6985        __struct.available_capacity = buf.get_f32_le()?;
6986        __struct.image_status = buf.get_u8()?;
6987        __struct.video_status = buf.get_u8()?;
6988        __struct.image_count = buf.get_i32_le()?;
6989        __struct.camera_device_id = buf.get_u8()?;
6990        Ok(__struct)
6991    }
6992    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6993        let mut __tmp = BytesMut::new(bytes);
6994        #[allow(clippy::absurd_extreme_comparisons)]
6995        #[allow(unused_comparisons)]
6996        if __tmp.remaining() < Self::ENCODED_LEN {
6997            panic!(
6998                "buffer is too small (need {} bytes, but got {})",
6999                Self::ENCODED_LEN,
7000                __tmp.remaining(),
7001            )
7002        }
7003        __tmp.put_u32_le(self.time_boot_ms);
7004        __tmp.put_f32_le(self.image_interval);
7005        __tmp.put_u32_le(self.recording_time_ms);
7006        __tmp.put_f32_le(self.available_capacity);
7007        __tmp.put_u8(self.image_status);
7008        __tmp.put_u8(self.video_status);
7009        if matches!(version, MavlinkVersion::V2) {
7010            __tmp.put_i32_le(self.image_count);
7011            __tmp.put_u8(self.camera_device_id);
7012            let len = __tmp.len();
7013            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7014        } else {
7015            __tmp.len()
7016        }
7017    }
7018}
7019#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7020#[doc = ""]
7021#[doc = "ID: 271"]
7022#[derive(Debug, Clone, PartialEq)]
7023#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7024#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7025#[cfg_attr(feature = "ts", derive(TS))]
7026#[cfg_attr(feature = "ts", ts(export))]
7027pub struct CAMERA_FOV_STATUS_DATA {
7028    #[doc = "Timestamp (time since system boot)."]
7029    pub time_boot_ms: u32,
7030    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7031    pub lat_camera: i32,
7032    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7033    pub lon_camera: i32,
7034    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7035    pub alt_camera: i32,
7036    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7037    pub lat_image: i32,
7038    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7039    pub lon_image: i32,
7040    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7041    pub alt_image: i32,
7042    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7043    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7044    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7045    pub q: [f32; 4],
7046    #[doc = "Horizontal field of view (NaN if unknown)."]
7047    pub hfov: f32,
7048    #[doc = "Vertical field of view (NaN if unknown)."]
7049    pub vfov: f32,
7050    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7051    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7052    pub camera_device_id: u8,
7053}
7054impl CAMERA_FOV_STATUS_DATA {
7055    pub const ENCODED_LEN: usize = 53usize;
7056    pub const DEFAULT: Self = Self {
7057        time_boot_ms: 0_u32,
7058        lat_camera: 0_i32,
7059        lon_camera: 0_i32,
7060        alt_camera: 0_i32,
7061        lat_image: 0_i32,
7062        lon_image: 0_i32,
7063        alt_image: 0_i32,
7064        q: [0.0_f32; 4usize],
7065        hfov: 0.0_f32,
7066        vfov: 0.0_f32,
7067        camera_device_id: 0_u8,
7068    };
7069    #[cfg(feature = "arbitrary")]
7070    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7071        use arbitrary::{Arbitrary, Unstructured};
7072        let mut buf = [0u8; 1024];
7073        rng.fill_bytes(&mut buf);
7074        let mut unstructured = Unstructured::new(&buf);
7075        Self::arbitrary(&mut unstructured).unwrap_or_default()
7076    }
7077}
7078impl Default for CAMERA_FOV_STATUS_DATA {
7079    fn default() -> Self {
7080        Self::DEFAULT.clone()
7081    }
7082}
7083impl MessageData for CAMERA_FOV_STATUS_DATA {
7084    type Message = MavMessage;
7085    const ID: u32 = 271u32;
7086    const NAME: &'static str = "CAMERA_FOV_STATUS";
7087    const EXTRA_CRC: u8 = 22u8;
7088    const ENCODED_LEN: usize = 53usize;
7089    fn deser(
7090        _version: MavlinkVersion,
7091        __input: &[u8],
7092    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7093        let avail_len = __input.len();
7094        let mut payload_buf = [0; Self::ENCODED_LEN];
7095        let mut buf = if avail_len < Self::ENCODED_LEN {
7096            payload_buf[0..avail_len].copy_from_slice(__input);
7097            Bytes::new(&payload_buf)
7098        } else {
7099            Bytes::new(__input)
7100        };
7101        let mut __struct = Self::default();
7102        __struct.time_boot_ms = buf.get_u32_le()?;
7103        __struct.lat_camera = buf.get_i32_le()?;
7104        __struct.lon_camera = buf.get_i32_le()?;
7105        __struct.alt_camera = buf.get_i32_le()?;
7106        __struct.lat_image = buf.get_i32_le()?;
7107        __struct.lon_image = buf.get_i32_le()?;
7108        __struct.alt_image = buf.get_i32_le()?;
7109        for v in &mut __struct.q {
7110            let val = buf.get_f32_le()?;
7111            *v = val;
7112        }
7113        __struct.hfov = buf.get_f32_le()?;
7114        __struct.vfov = buf.get_f32_le()?;
7115        __struct.camera_device_id = buf.get_u8()?;
7116        Ok(__struct)
7117    }
7118    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7119        let mut __tmp = BytesMut::new(bytes);
7120        #[allow(clippy::absurd_extreme_comparisons)]
7121        #[allow(unused_comparisons)]
7122        if __tmp.remaining() < Self::ENCODED_LEN {
7123            panic!(
7124                "buffer is too small (need {} bytes, but got {})",
7125                Self::ENCODED_LEN,
7126                __tmp.remaining(),
7127            )
7128        }
7129        __tmp.put_u32_le(self.time_boot_ms);
7130        __tmp.put_i32_le(self.lat_camera);
7131        __tmp.put_i32_le(self.lon_camera);
7132        __tmp.put_i32_le(self.alt_camera);
7133        __tmp.put_i32_le(self.lat_image);
7134        __tmp.put_i32_le(self.lon_image);
7135        __tmp.put_i32_le(self.alt_image);
7136        for val in &self.q {
7137            __tmp.put_f32_le(*val);
7138        }
7139        __tmp.put_f32_le(self.hfov);
7140        __tmp.put_f32_le(self.vfov);
7141        if matches!(version, MavlinkVersion::V2) {
7142            __tmp.put_u8(self.camera_device_id);
7143            let len = __tmp.len();
7144            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7145        } else {
7146            __tmp.len()
7147        }
7148    }
7149}
7150#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7151#[doc = ""]
7152#[doc = "ID: 263"]
7153#[derive(Debug, Clone, PartialEq)]
7154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7155#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7156#[cfg_attr(feature = "ts", derive(TS))]
7157#[cfg_attr(feature = "ts", ts(export))]
7158pub struct CAMERA_IMAGE_CAPTURED_DATA {
7159    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7160    pub time_utc: u64,
7161    #[doc = "Timestamp (time since system boot)."]
7162    pub time_boot_ms: u32,
7163    #[doc = "Latitude where image was taken"]
7164    pub lat: i32,
7165    #[doc = "Longitude where capture was taken"]
7166    pub lon: i32,
7167    #[doc = "Altitude (MSL) where image was taken"]
7168    pub alt: i32,
7169    #[doc = "Altitude above ground"]
7170    pub relative_alt: i32,
7171    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7172    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7173    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7174    pub q: [f32; 4],
7175    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7176    pub image_index: i32,
7177    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7178    pub camera_id: u8,
7179    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7180    pub capture_result: i8,
7181    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7182    #[cfg_attr(feature = "ts", ts(type = "string"))]
7183    pub file_url: CharArray<205>,
7184}
7185impl CAMERA_IMAGE_CAPTURED_DATA {
7186    pub const ENCODED_LEN: usize = 255usize;
7187    pub const DEFAULT: Self = Self {
7188        time_utc: 0_u64,
7189        time_boot_ms: 0_u32,
7190        lat: 0_i32,
7191        lon: 0_i32,
7192        alt: 0_i32,
7193        relative_alt: 0_i32,
7194        q: [0.0_f32; 4usize],
7195        image_index: 0_i32,
7196        camera_id: 0_u8,
7197        capture_result: 0_i8,
7198        file_url: CharArray::new([0_u8; 205usize]),
7199    };
7200    #[cfg(feature = "arbitrary")]
7201    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7202        use arbitrary::{Arbitrary, Unstructured};
7203        let mut buf = [0u8; 1024];
7204        rng.fill_bytes(&mut buf);
7205        let mut unstructured = Unstructured::new(&buf);
7206        Self::arbitrary(&mut unstructured).unwrap_or_default()
7207    }
7208}
7209impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7210    fn default() -> Self {
7211        Self::DEFAULT.clone()
7212    }
7213}
7214impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7215    type Message = MavMessage;
7216    const ID: u32 = 263u32;
7217    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7218    const EXTRA_CRC: u8 = 133u8;
7219    const ENCODED_LEN: usize = 255usize;
7220    fn deser(
7221        _version: MavlinkVersion,
7222        __input: &[u8],
7223    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7224        let avail_len = __input.len();
7225        let mut payload_buf = [0; Self::ENCODED_LEN];
7226        let mut buf = if avail_len < Self::ENCODED_LEN {
7227            payload_buf[0..avail_len].copy_from_slice(__input);
7228            Bytes::new(&payload_buf)
7229        } else {
7230            Bytes::new(__input)
7231        };
7232        let mut __struct = Self::default();
7233        __struct.time_utc = buf.get_u64_le()?;
7234        __struct.time_boot_ms = buf.get_u32_le()?;
7235        __struct.lat = buf.get_i32_le()?;
7236        __struct.lon = buf.get_i32_le()?;
7237        __struct.alt = buf.get_i32_le()?;
7238        __struct.relative_alt = buf.get_i32_le()?;
7239        for v in &mut __struct.q {
7240            let val = buf.get_f32_le()?;
7241            *v = val;
7242        }
7243        __struct.image_index = buf.get_i32_le()?;
7244        __struct.camera_id = buf.get_u8()?;
7245        __struct.capture_result = buf.get_i8()?;
7246        let mut tmp = [0_u8; 205usize];
7247        for v in &mut tmp {
7248            *v = buf.get_u8()?;
7249        }
7250        __struct.file_url = CharArray::new(tmp);
7251        Ok(__struct)
7252    }
7253    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7254        let mut __tmp = BytesMut::new(bytes);
7255        #[allow(clippy::absurd_extreme_comparisons)]
7256        #[allow(unused_comparisons)]
7257        if __tmp.remaining() < Self::ENCODED_LEN {
7258            panic!(
7259                "buffer is too small (need {} bytes, but got {})",
7260                Self::ENCODED_LEN,
7261                __tmp.remaining(),
7262            )
7263        }
7264        __tmp.put_u64_le(self.time_utc);
7265        __tmp.put_u32_le(self.time_boot_ms);
7266        __tmp.put_i32_le(self.lat);
7267        __tmp.put_i32_le(self.lon);
7268        __tmp.put_i32_le(self.alt);
7269        __tmp.put_i32_le(self.relative_alt);
7270        for val in &self.q {
7271            __tmp.put_f32_le(*val);
7272        }
7273        __tmp.put_i32_le(self.image_index);
7274        __tmp.put_u8(self.camera_id);
7275        __tmp.put_i8(self.capture_result);
7276        for val in &self.file_url {
7277            __tmp.put_u8(*val);
7278        }
7279        if matches!(version, MavlinkVersion::V2) {
7280            let len = __tmp.len();
7281            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7282        } else {
7283            __tmp.len()
7284        }
7285    }
7286}
7287#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7288#[doc = ""]
7289#[doc = "ID: 259"]
7290#[derive(Debug, Clone, PartialEq)]
7291#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7292#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7293#[cfg_attr(feature = "ts", derive(TS))]
7294#[cfg_attr(feature = "ts", ts(export))]
7295pub struct CAMERA_INFORMATION_DATA {
7296    #[doc = "Timestamp (time since system boot)."]
7297    pub time_boot_ms: u32,
7298    #[doc = "Version of the camera firmware, encoded as: (Dev&amp;0xff)&lt;&lt;24 | (Patch&amp;0xff)&lt;&lt;16 | (Minor&amp;0xff)&lt;&lt;8 | (Major&amp;0xff). Use 0 if not known."]
7299    pub firmware_version: u32,
7300    #[doc = "Focal length. Use NaN if not known."]
7301    pub focal_length: f32,
7302    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7303    pub sensor_size_h: f32,
7304    #[doc = "Image sensor size vertical. Use NaN if not known."]
7305    pub sensor_size_v: f32,
7306    #[doc = "Bitmap of camera capability flags."]
7307    pub flags: CameraCapFlags,
7308    #[doc = "Horizontal image resolution. Use 0 if not known."]
7309    pub resolution_h: u16,
7310    #[doc = "Vertical image resolution. Use 0 if not known."]
7311    pub resolution_v: u16,
7312    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7313    pub cam_definition_version: u16,
7314    #[doc = "Name of the camera vendor"]
7315    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7316    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7317    pub vendor_name: [u8; 32],
7318    #[doc = "Name of the camera model"]
7319    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7320    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7321    pub model_name: [u8; 32],
7322    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7323    pub lens_id: u8,
7324    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7325    #[cfg_attr(feature = "ts", ts(type = "string"))]
7326    pub cam_definition_uri: CharArray<140>,
7327    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7328    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7329    pub gimbal_device_id: u8,
7330    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7331    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7332    pub camera_device_id: u8,
7333}
7334impl CAMERA_INFORMATION_DATA {
7335    pub const ENCODED_LEN: usize = 237usize;
7336    pub const DEFAULT: Self = Self {
7337        time_boot_ms: 0_u32,
7338        firmware_version: 0_u32,
7339        focal_length: 0.0_f32,
7340        sensor_size_h: 0.0_f32,
7341        sensor_size_v: 0.0_f32,
7342        flags: CameraCapFlags::DEFAULT,
7343        resolution_h: 0_u16,
7344        resolution_v: 0_u16,
7345        cam_definition_version: 0_u16,
7346        vendor_name: [0_u8; 32usize],
7347        model_name: [0_u8; 32usize],
7348        lens_id: 0_u8,
7349        cam_definition_uri: CharArray::new([0_u8; 140usize]),
7350        gimbal_device_id: 0_u8,
7351        camera_device_id: 0_u8,
7352    };
7353    #[cfg(feature = "arbitrary")]
7354    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7355        use arbitrary::{Arbitrary, Unstructured};
7356        let mut buf = [0u8; 1024];
7357        rng.fill_bytes(&mut buf);
7358        let mut unstructured = Unstructured::new(&buf);
7359        Self::arbitrary(&mut unstructured).unwrap_or_default()
7360    }
7361}
7362impl Default for CAMERA_INFORMATION_DATA {
7363    fn default() -> Self {
7364        Self::DEFAULT.clone()
7365    }
7366}
7367impl MessageData for CAMERA_INFORMATION_DATA {
7368    type Message = MavMessage;
7369    const ID: u32 = 259u32;
7370    const NAME: &'static str = "CAMERA_INFORMATION";
7371    const EXTRA_CRC: u8 = 92u8;
7372    const ENCODED_LEN: usize = 237usize;
7373    fn deser(
7374        _version: MavlinkVersion,
7375        __input: &[u8],
7376    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7377        let avail_len = __input.len();
7378        let mut payload_buf = [0; Self::ENCODED_LEN];
7379        let mut buf = if avail_len < Self::ENCODED_LEN {
7380            payload_buf[0..avail_len].copy_from_slice(__input);
7381            Bytes::new(&payload_buf)
7382        } else {
7383            Bytes::new(__input)
7384        };
7385        let mut __struct = Self::default();
7386        __struct.time_boot_ms = buf.get_u32_le()?;
7387        __struct.firmware_version = buf.get_u32_le()?;
7388        __struct.focal_length = buf.get_f32_le()?;
7389        __struct.sensor_size_h = buf.get_f32_le()?;
7390        __struct.sensor_size_v = buf.get_f32_le()?;
7391        let tmp = buf.get_u32_le()?;
7392        __struct.flags = CameraCapFlags::from_bits(tmp as <CameraCapFlags as Flags>::Bits).ok_or(
7393            ::mavlink_core::error::ParserError::InvalidFlag {
7394                flag_type: "CameraCapFlags",
7395                value: tmp as u64,
7396            },
7397        )?;
7398        __struct.resolution_h = buf.get_u16_le()?;
7399        __struct.resolution_v = buf.get_u16_le()?;
7400        __struct.cam_definition_version = buf.get_u16_le()?;
7401        for v in &mut __struct.vendor_name {
7402            let val = buf.get_u8()?;
7403            *v = val;
7404        }
7405        for v in &mut __struct.model_name {
7406            let val = buf.get_u8()?;
7407            *v = val;
7408        }
7409        __struct.lens_id = buf.get_u8()?;
7410        let mut tmp = [0_u8; 140usize];
7411        for v in &mut tmp {
7412            *v = buf.get_u8()?;
7413        }
7414        __struct.cam_definition_uri = CharArray::new(tmp);
7415        __struct.gimbal_device_id = buf.get_u8()?;
7416        __struct.camera_device_id = buf.get_u8()?;
7417        Ok(__struct)
7418    }
7419    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7420        let mut __tmp = BytesMut::new(bytes);
7421        #[allow(clippy::absurd_extreme_comparisons)]
7422        #[allow(unused_comparisons)]
7423        if __tmp.remaining() < Self::ENCODED_LEN {
7424            panic!(
7425                "buffer is too small (need {} bytes, but got {})",
7426                Self::ENCODED_LEN,
7427                __tmp.remaining(),
7428            )
7429        }
7430        __tmp.put_u32_le(self.time_boot_ms);
7431        __tmp.put_u32_le(self.firmware_version);
7432        __tmp.put_f32_le(self.focal_length);
7433        __tmp.put_f32_le(self.sensor_size_h);
7434        __tmp.put_f32_le(self.sensor_size_v);
7435        __tmp.put_u32_le(self.flags.bits() as u32);
7436        __tmp.put_u16_le(self.resolution_h);
7437        __tmp.put_u16_le(self.resolution_v);
7438        __tmp.put_u16_le(self.cam_definition_version);
7439        for val in &self.vendor_name {
7440            __tmp.put_u8(*val);
7441        }
7442        for val in &self.model_name {
7443            __tmp.put_u8(*val);
7444        }
7445        __tmp.put_u8(self.lens_id);
7446        for val in &self.cam_definition_uri {
7447            __tmp.put_u8(*val);
7448        }
7449        if matches!(version, MavlinkVersion::V2) {
7450            __tmp.put_u8(self.gimbal_device_id);
7451            __tmp.put_u8(self.camera_device_id);
7452            let len = __tmp.len();
7453            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7454        } else {
7455            __tmp.len()
7456        }
7457    }
7458}
7459#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7460#[doc = ""]
7461#[doc = "ID: 260"]
7462#[derive(Debug, Clone, PartialEq)]
7463#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7464#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7465#[cfg_attr(feature = "ts", derive(TS))]
7466#[cfg_attr(feature = "ts", ts(export))]
7467pub struct CAMERA_SETTINGS_DATA {
7468    #[doc = "Timestamp (time since system boot)."]
7469    pub time_boot_ms: u32,
7470    #[doc = "Camera mode"]
7471    pub mode_id: CameraMode,
7472    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7473    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7474    pub zoomLevel: f32,
7475    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7476    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7477    pub focusLevel: f32,
7478    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7479    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7480    pub camera_device_id: u8,
7481}
7482impl CAMERA_SETTINGS_DATA {
7483    pub const ENCODED_LEN: usize = 14usize;
7484    pub const DEFAULT: Self = Self {
7485        time_boot_ms: 0_u32,
7486        mode_id: CameraMode::DEFAULT,
7487        zoomLevel: 0.0_f32,
7488        focusLevel: 0.0_f32,
7489        camera_device_id: 0_u8,
7490    };
7491    #[cfg(feature = "arbitrary")]
7492    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7493        use arbitrary::{Arbitrary, Unstructured};
7494        let mut buf = [0u8; 1024];
7495        rng.fill_bytes(&mut buf);
7496        let mut unstructured = Unstructured::new(&buf);
7497        Self::arbitrary(&mut unstructured).unwrap_or_default()
7498    }
7499}
7500impl Default for CAMERA_SETTINGS_DATA {
7501    fn default() -> Self {
7502        Self::DEFAULT.clone()
7503    }
7504}
7505impl MessageData for CAMERA_SETTINGS_DATA {
7506    type Message = MavMessage;
7507    const ID: u32 = 260u32;
7508    const NAME: &'static str = "CAMERA_SETTINGS";
7509    const EXTRA_CRC: u8 = 146u8;
7510    const ENCODED_LEN: usize = 14usize;
7511    fn deser(
7512        _version: MavlinkVersion,
7513        __input: &[u8],
7514    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7515        let avail_len = __input.len();
7516        let mut payload_buf = [0; Self::ENCODED_LEN];
7517        let mut buf = if avail_len < Self::ENCODED_LEN {
7518            payload_buf[0..avail_len].copy_from_slice(__input);
7519            Bytes::new(&payload_buf)
7520        } else {
7521            Bytes::new(__input)
7522        };
7523        let mut __struct = Self::default();
7524        __struct.time_boot_ms = buf.get_u32_le()?;
7525        let tmp = buf.get_u8()?;
7526        __struct.mode_id =
7527            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7528                enum_type: "CameraMode",
7529                value: tmp as u64,
7530            })?;
7531        __struct.zoomLevel = buf.get_f32_le()?;
7532        __struct.focusLevel = buf.get_f32_le()?;
7533        __struct.camera_device_id = buf.get_u8()?;
7534        Ok(__struct)
7535    }
7536    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7537        let mut __tmp = BytesMut::new(bytes);
7538        #[allow(clippy::absurd_extreme_comparisons)]
7539        #[allow(unused_comparisons)]
7540        if __tmp.remaining() < Self::ENCODED_LEN {
7541            panic!(
7542                "buffer is too small (need {} bytes, but got {})",
7543                Self::ENCODED_LEN,
7544                __tmp.remaining(),
7545            )
7546        }
7547        __tmp.put_u32_le(self.time_boot_ms);
7548        __tmp.put_u8(self.mode_id as u8);
7549        if matches!(version, MavlinkVersion::V2) {
7550            __tmp.put_f32_le(self.zoomLevel);
7551            __tmp.put_f32_le(self.focusLevel);
7552            __tmp.put_u8(self.camera_device_id);
7553            let len = __tmp.len();
7554            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7555        } else {
7556            __tmp.len()
7557        }
7558    }
7559}
7560#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7561#[doc = ""]
7562#[doc = "ID: 277"]
7563#[derive(Debug, Clone, PartialEq)]
7564#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7565#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7566#[cfg_attr(feature = "ts", derive(TS))]
7567#[cfg_attr(feature = "ts", ts(export))]
7568pub struct CAMERA_THERMAL_RANGE_DATA {
7569    #[doc = "Timestamp (time since system boot)."]
7570    pub time_boot_ms: u32,
7571    #[doc = "Temperature max."]
7572    pub max: f32,
7573    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7574    pub max_point_x: f32,
7575    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7576    pub max_point_y: f32,
7577    #[doc = "Temperature min."]
7578    pub min: f32,
7579    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7580    pub min_point_x: f32,
7581    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7582    pub min_point_y: f32,
7583    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7584    pub stream_id: u8,
7585    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7586    pub camera_device_id: u8,
7587}
7588impl CAMERA_THERMAL_RANGE_DATA {
7589    pub const ENCODED_LEN: usize = 30usize;
7590    pub const DEFAULT: Self = Self {
7591        time_boot_ms: 0_u32,
7592        max: 0.0_f32,
7593        max_point_x: 0.0_f32,
7594        max_point_y: 0.0_f32,
7595        min: 0.0_f32,
7596        min_point_x: 0.0_f32,
7597        min_point_y: 0.0_f32,
7598        stream_id: 0_u8,
7599        camera_device_id: 0_u8,
7600    };
7601    #[cfg(feature = "arbitrary")]
7602    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7603        use arbitrary::{Arbitrary, Unstructured};
7604        let mut buf = [0u8; 1024];
7605        rng.fill_bytes(&mut buf);
7606        let mut unstructured = Unstructured::new(&buf);
7607        Self::arbitrary(&mut unstructured).unwrap_or_default()
7608    }
7609}
7610impl Default for CAMERA_THERMAL_RANGE_DATA {
7611    fn default() -> Self {
7612        Self::DEFAULT.clone()
7613    }
7614}
7615impl MessageData for CAMERA_THERMAL_RANGE_DATA {
7616    type Message = MavMessage;
7617    const ID: u32 = 277u32;
7618    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
7619    const EXTRA_CRC: u8 = 62u8;
7620    const ENCODED_LEN: usize = 30usize;
7621    fn deser(
7622        _version: MavlinkVersion,
7623        __input: &[u8],
7624    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7625        let avail_len = __input.len();
7626        let mut payload_buf = [0; Self::ENCODED_LEN];
7627        let mut buf = if avail_len < Self::ENCODED_LEN {
7628            payload_buf[0..avail_len].copy_from_slice(__input);
7629            Bytes::new(&payload_buf)
7630        } else {
7631            Bytes::new(__input)
7632        };
7633        let mut __struct = Self::default();
7634        __struct.time_boot_ms = buf.get_u32_le()?;
7635        __struct.max = buf.get_f32_le()?;
7636        __struct.max_point_x = buf.get_f32_le()?;
7637        __struct.max_point_y = buf.get_f32_le()?;
7638        __struct.min = buf.get_f32_le()?;
7639        __struct.min_point_x = buf.get_f32_le()?;
7640        __struct.min_point_y = buf.get_f32_le()?;
7641        __struct.stream_id = buf.get_u8()?;
7642        __struct.camera_device_id = buf.get_u8()?;
7643        Ok(__struct)
7644    }
7645    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7646        let mut __tmp = BytesMut::new(bytes);
7647        #[allow(clippy::absurd_extreme_comparisons)]
7648        #[allow(unused_comparisons)]
7649        if __tmp.remaining() < Self::ENCODED_LEN {
7650            panic!(
7651                "buffer is too small (need {} bytes, but got {})",
7652                Self::ENCODED_LEN,
7653                __tmp.remaining(),
7654            )
7655        }
7656        __tmp.put_u32_le(self.time_boot_ms);
7657        __tmp.put_f32_le(self.max);
7658        __tmp.put_f32_le(self.max_point_x);
7659        __tmp.put_f32_le(self.max_point_y);
7660        __tmp.put_f32_le(self.min);
7661        __tmp.put_f32_le(self.min_point_x);
7662        __tmp.put_f32_le(self.min_point_y);
7663        __tmp.put_u8(self.stream_id);
7664        __tmp.put_u8(self.camera_device_id);
7665        if matches!(version, MavlinkVersion::V2) {
7666            let len = __tmp.len();
7667            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7668        } else {
7669            __tmp.len()
7670        }
7671    }
7672}
7673#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7674#[doc = ""]
7675#[doc = "ID: 276"]
7676#[derive(Debug, Clone, PartialEq)]
7677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7679#[cfg_attr(feature = "ts", derive(TS))]
7680#[cfg_attr(feature = "ts", ts(export))]
7681pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
7682    #[doc = "Latitude of tracked object"]
7683    pub lat: i32,
7684    #[doc = "Longitude of tracked object"]
7685    pub lon: i32,
7686    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
7687    pub alt: f32,
7688    #[doc = "Horizontal accuracy. NAN if unknown"]
7689    pub h_acc: f32,
7690    #[doc = "Vertical accuracy. NAN if unknown"]
7691    pub v_acc: f32,
7692    #[doc = "North velocity of tracked object. NAN if unknown"]
7693    pub vel_n: f32,
7694    #[doc = "East velocity of tracked object. NAN if unknown"]
7695    pub vel_e: f32,
7696    #[doc = "Down velocity of tracked object. NAN if unknown"]
7697    pub vel_d: f32,
7698    #[doc = "Velocity accuracy. NAN if unknown"]
7699    pub vel_acc: f32,
7700    #[doc = "Distance between camera and tracked object. NAN if unknown"]
7701    pub dist: f32,
7702    #[doc = "Heading in radians, in NED. NAN if unknown"]
7703    pub hdg: f32,
7704    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
7705    pub hdg_acc: f32,
7706    #[doc = "Current tracking status"]
7707    pub tracking_status: CameraTrackingStatusFlags,
7708    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7709    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7710    pub camera_device_id: u8,
7711}
7712impl CAMERA_TRACKING_GEO_STATUS_DATA {
7713    pub const ENCODED_LEN: usize = 50usize;
7714    pub const DEFAULT: Self = Self {
7715        lat: 0_i32,
7716        lon: 0_i32,
7717        alt: 0.0_f32,
7718        h_acc: 0.0_f32,
7719        v_acc: 0.0_f32,
7720        vel_n: 0.0_f32,
7721        vel_e: 0.0_f32,
7722        vel_d: 0.0_f32,
7723        vel_acc: 0.0_f32,
7724        dist: 0.0_f32,
7725        hdg: 0.0_f32,
7726        hdg_acc: 0.0_f32,
7727        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7728        camera_device_id: 0_u8,
7729    };
7730    #[cfg(feature = "arbitrary")]
7731    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7732        use arbitrary::{Arbitrary, Unstructured};
7733        let mut buf = [0u8; 1024];
7734        rng.fill_bytes(&mut buf);
7735        let mut unstructured = Unstructured::new(&buf);
7736        Self::arbitrary(&mut unstructured).unwrap_or_default()
7737    }
7738}
7739impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
7740    fn default() -> Self {
7741        Self::DEFAULT.clone()
7742    }
7743}
7744impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
7745    type Message = MavMessage;
7746    const ID: u32 = 276u32;
7747    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
7748    const EXTRA_CRC: u8 = 18u8;
7749    const ENCODED_LEN: usize = 50usize;
7750    fn deser(
7751        _version: MavlinkVersion,
7752        __input: &[u8],
7753    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7754        let avail_len = __input.len();
7755        let mut payload_buf = [0; Self::ENCODED_LEN];
7756        let mut buf = if avail_len < Self::ENCODED_LEN {
7757            payload_buf[0..avail_len].copy_from_slice(__input);
7758            Bytes::new(&payload_buf)
7759        } else {
7760            Bytes::new(__input)
7761        };
7762        let mut __struct = Self::default();
7763        __struct.lat = buf.get_i32_le()?;
7764        __struct.lon = buf.get_i32_le()?;
7765        __struct.alt = buf.get_f32_le()?;
7766        __struct.h_acc = buf.get_f32_le()?;
7767        __struct.v_acc = buf.get_f32_le()?;
7768        __struct.vel_n = buf.get_f32_le()?;
7769        __struct.vel_e = buf.get_f32_le()?;
7770        __struct.vel_d = buf.get_f32_le()?;
7771        __struct.vel_acc = buf.get_f32_le()?;
7772        __struct.dist = buf.get_f32_le()?;
7773        __struct.hdg = buf.get_f32_le()?;
7774        __struct.hdg_acc = buf.get_f32_le()?;
7775        let tmp = buf.get_u8()?;
7776        __struct.tracking_status =
7777            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7778                enum_type: "CameraTrackingStatusFlags",
7779                value: tmp as u64,
7780            })?;
7781        __struct.camera_device_id = buf.get_u8()?;
7782        Ok(__struct)
7783    }
7784    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7785        let mut __tmp = BytesMut::new(bytes);
7786        #[allow(clippy::absurd_extreme_comparisons)]
7787        #[allow(unused_comparisons)]
7788        if __tmp.remaining() < Self::ENCODED_LEN {
7789            panic!(
7790                "buffer is too small (need {} bytes, but got {})",
7791                Self::ENCODED_LEN,
7792                __tmp.remaining(),
7793            )
7794        }
7795        __tmp.put_i32_le(self.lat);
7796        __tmp.put_i32_le(self.lon);
7797        __tmp.put_f32_le(self.alt);
7798        __tmp.put_f32_le(self.h_acc);
7799        __tmp.put_f32_le(self.v_acc);
7800        __tmp.put_f32_le(self.vel_n);
7801        __tmp.put_f32_le(self.vel_e);
7802        __tmp.put_f32_le(self.vel_d);
7803        __tmp.put_f32_le(self.vel_acc);
7804        __tmp.put_f32_le(self.dist);
7805        __tmp.put_f32_le(self.hdg);
7806        __tmp.put_f32_le(self.hdg_acc);
7807        __tmp.put_u8(self.tracking_status as u8);
7808        if matches!(version, MavlinkVersion::V2) {
7809            __tmp.put_u8(self.camera_device_id);
7810            let len = __tmp.len();
7811            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7812        } else {
7813            __tmp.len()
7814        }
7815    }
7816}
7817#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7818#[doc = ""]
7819#[doc = "ID: 275"]
7820#[derive(Debug, Clone, PartialEq)]
7821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7823#[cfg_attr(feature = "ts", derive(TS))]
7824#[cfg_attr(feature = "ts", ts(export))]
7825pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
7826    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7827    pub point_x: f32,
7828    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7829    pub point_y: f32,
7830    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
7831    pub radius: f32,
7832    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7833    pub rec_top_x: f32,
7834    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7835    pub rec_top_y: f32,
7836    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7837    pub rec_bottom_x: f32,
7838    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7839    pub rec_bottom_y: f32,
7840    #[doc = "Current tracking status"]
7841    pub tracking_status: CameraTrackingStatusFlags,
7842    #[doc = "Current tracking mode"]
7843    pub tracking_mode: CameraTrackingMode,
7844    #[doc = "Defines location of target data"]
7845    pub target_data: CameraTrackingTargetData,
7846    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7847    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7848    pub camera_device_id: u8,
7849}
7850impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
7851    pub const ENCODED_LEN: usize = 32usize;
7852    pub const DEFAULT: Self = Self {
7853        point_x: 0.0_f32,
7854        point_y: 0.0_f32,
7855        radius: 0.0_f32,
7856        rec_top_x: 0.0_f32,
7857        rec_top_y: 0.0_f32,
7858        rec_bottom_x: 0.0_f32,
7859        rec_bottom_y: 0.0_f32,
7860        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7861        tracking_mode: CameraTrackingMode::DEFAULT,
7862        target_data: CameraTrackingTargetData::DEFAULT,
7863        camera_device_id: 0_u8,
7864    };
7865    #[cfg(feature = "arbitrary")]
7866    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7867        use arbitrary::{Arbitrary, Unstructured};
7868        let mut buf = [0u8; 1024];
7869        rng.fill_bytes(&mut buf);
7870        let mut unstructured = Unstructured::new(&buf);
7871        Self::arbitrary(&mut unstructured).unwrap_or_default()
7872    }
7873}
7874impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7875    fn default() -> Self {
7876        Self::DEFAULT.clone()
7877    }
7878}
7879impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7880    type Message = MavMessage;
7881    const ID: u32 = 275u32;
7882    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
7883    const EXTRA_CRC: u8 = 126u8;
7884    const ENCODED_LEN: usize = 32usize;
7885    fn deser(
7886        _version: MavlinkVersion,
7887        __input: &[u8],
7888    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7889        let avail_len = __input.len();
7890        let mut payload_buf = [0; Self::ENCODED_LEN];
7891        let mut buf = if avail_len < Self::ENCODED_LEN {
7892            payload_buf[0..avail_len].copy_from_slice(__input);
7893            Bytes::new(&payload_buf)
7894        } else {
7895            Bytes::new(__input)
7896        };
7897        let mut __struct = Self::default();
7898        __struct.point_x = buf.get_f32_le()?;
7899        __struct.point_y = buf.get_f32_le()?;
7900        __struct.radius = buf.get_f32_le()?;
7901        __struct.rec_top_x = buf.get_f32_le()?;
7902        __struct.rec_top_y = buf.get_f32_le()?;
7903        __struct.rec_bottom_x = buf.get_f32_le()?;
7904        __struct.rec_bottom_y = buf.get_f32_le()?;
7905        let tmp = buf.get_u8()?;
7906        __struct.tracking_status =
7907            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7908                enum_type: "CameraTrackingStatusFlags",
7909                value: tmp as u64,
7910            })?;
7911        let tmp = buf.get_u8()?;
7912        __struct.tracking_mode =
7913            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7914                enum_type: "CameraTrackingMode",
7915                value: tmp as u64,
7916            })?;
7917        let tmp = buf.get_u8()?;
7918        __struct.target_data =
7919            CameraTrackingTargetData::from_bits(tmp as <CameraTrackingTargetData as Flags>::Bits)
7920                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7921                flag_type: "CameraTrackingTargetData",
7922                value: tmp as u64,
7923            })?;
7924        __struct.camera_device_id = buf.get_u8()?;
7925        Ok(__struct)
7926    }
7927    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7928        let mut __tmp = BytesMut::new(bytes);
7929        #[allow(clippy::absurd_extreme_comparisons)]
7930        #[allow(unused_comparisons)]
7931        if __tmp.remaining() < Self::ENCODED_LEN {
7932            panic!(
7933                "buffer is too small (need {} bytes, but got {})",
7934                Self::ENCODED_LEN,
7935                __tmp.remaining(),
7936            )
7937        }
7938        __tmp.put_f32_le(self.point_x);
7939        __tmp.put_f32_le(self.point_y);
7940        __tmp.put_f32_le(self.radius);
7941        __tmp.put_f32_le(self.rec_top_x);
7942        __tmp.put_f32_le(self.rec_top_y);
7943        __tmp.put_f32_le(self.rec_bottom_x);
7944        __tmp.put_f32_le(self.rec_bottom_y);
7945        __tmp.put_u8(self.tracking_status as u8);
7946        __tmp.put_u8(self.tracking_mode as u8);
7947        __tmp.put_u8(self.target_data.bits() as u8);
7948        if matches!(version, MavlinkVersion::V2) {
7949            __tmp.put_u8(self.camera_device_id);
7950            let len = __tmp.len();
7951            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7952        } else {
7953            __tmp.len()
7954        }
7955    }
7956}
7957#[doc = "Camera-IMU triggering and synchronisation message."]
7958#[doc = ""]
7959#[doc = "ID: 112"]
7960#[derive(Debug, Clone, PartialEq)]
7961#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7962#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7963#[cfg_attr(feature = "ts", derive(TS))]
7964#[cfg_attr(feature = "ts", ts(export))]
7965pub struct CAMERA_TRIGGER_DATA {
7966    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7967    pub time_usec: u64,
7968    #[doc = "Image frame sequence"]
7969    pub seq: u32,
7970}
7971impl CAMERA_TRIGGER_DATA {
7972    pub const ENCODED_LEN: usize = 12usize;
7973    pub const DEFAULT: Self = Self {
7974        time_usec: 0_u64,
7975        seq: 0_u32,
7976    };
7977    #[cfg(feature = "arbitrary")]
7978    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7979        use arbitrary::{Arbitrary, Unstructured};
7980        let mut buf = [0u8; 1024];
7981        rng.fill_bytes(&mut buf);
7982        let mut unstructured = Unstructured::new(&buf);
7983        Self::arbitrary(&mut unstructured).unwrap_or_default()
7984    }
7985}
7986impl Default for CAMERA_TRIGGER_DATA {
7987    fn default() -> Self {
7988        Self::DEFAULT.clone()
7989    }
7990}
7991impl MessageData for CAMERA_TRIGGER_DATA {
7992    type Message = MavMessage;
7993    const ID: u32 = 112u32;
7994    const NAME: &'static str = "CAMERA_TRIGGER";
7995    const EXTRA_CRC: u8 = 174u8;
7996    const ENCODED_LEN: usize = 12usize;
7997    fn deser(
7998        _version: MavlinkVersion,
7999        __input: &[u8],
8000    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8001        let avail_len = __input.len();
8002        let mut payload_buf = [0; Self::ENCODED_LEN];
8003        let mut buf = if avail_len < Self::ENCODED_LEN {
8004            payload_buf[0..avail_len].copy_from_slice(__input);
8005            Bytes::new(&payload_buf)
8006        } else {
8007            Bytes::new(__input)
8008        };
8009        let mut __struct = Self::default();
8010        __struct.time_usec = buf.get_u64_le()?;
8011        __struct.seq = buf.get_u32_le()?;
8012        Ok(__struct)
8013    }
8014    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8015        let mut __tmp = BytesMut::new(bytes);
8016        #[allow(clippy::absurd_extreme_comparisons)]
8017        #[allow(unused_comparisons)]
8018        if __tmp.remaining() < Self::ENCODED_LEN {
8019            panic!(
8020                "buffer is too small (need {} bytes, but got {})",
8021                Self::ENCODED_LEN,
8022                __tmp.remaining(),
8023            )
8024        }
8025        __tmp.put_u64_le(self.time_usec);
8026        __tmp.put_u32_le(self.seq);
8027        if matches!(version, MavlinkVersion::V2) {
8028            let len = __tmp.len();
8029            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8030        } else {
8031            __tmp.len()
8032        }
8033    }
8034}
8035#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8036#[doc = ""]
8037#[doc = "ID: 387"]
8038#[derive(Debug, Clone, PartialEq)]
8039#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8040#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8041#[cfg_attr(feature = "ts", derive(TS))]
8042#[cfg_attr(feature = "ts", ts(export))]
8043pub struct CANFD_FRAME_DATA {
8044    #[doc = "Frame ID"]
8045    pub id: u32,
8046    #[doc = "System ID."]
8047    pub target_system: u8,
8048    #[doc = "Component ID."]
8049    pub target_component: u8,
8050    #[doc = "bus number"]
8051    pub bus: u8,
8052    #[doc = "Frame length"]
8053    pub len: u8,
8054    #[doc = "Frame data"]
8055    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8056    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8057    pub data: [u8; 64],
8058}
8059impl CANFD_FRAME_DATA {
8060    pub const ENCODED_LEN: usize = 72usize;
8061    pub const DEFAULT: Self = Self {
8062        id: 0_u32,
8063        target_system: 0_u8,
8064        target_component: 0_u8,
8065        bus: 0_u8,
8066        len: 0_u8,
8067        data: [0_u8; 64usize],
8068    };
8069    #[cfg(feature = "arbitrary")]
8070    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8071        use arbitrary::{Arbitrary, Unstructured};
8072        let mut buf = [0u8; 1024];
8073        rng.fill_bytes(&mut buf);
8074        let mut unstructured = Unstructured::new(&buf);
8075        Self::arbitrary(&mut unstructured).unwrap_or_default()
8076    }
8077}
8078impl Default for CANFD_FRAME_DATA {
8079    fn default() -> Self {
8080        Self::DEFAULT.clone()
8081    }
8082}
8083impl MessageData for CANFD_FRAME_DATA {
8084    type Message = MavMessage;
8085    const ID: u32 = 387u32;
8086    const NAME: &'static str = "CANFD_FRAME";
8087    const EXTRA_CRC: u8 = 4u8;
8088    const ENCODED_LEN: usize = 72usize;
8089    fn deser(
8090        _version: MavlinkVersion,
8091        __input: &[u8],
8092    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8093        let avail_len = __input.len();
8094        let mut payload_buf = [0; Self::ENCODED_LEN];
8095        let mut buf = if avail_len < Self::ENCODED_LEN {
8096            payload_buf[0..avail_len].copy_from_slice(__input);
8097            Bytes::new(&payload_buf)
8098        } else {
8099            Bytes::new(__input)
8100        };
8101        let mut __struct = Self::default();
8102        __struct.id = buf.get_u32_le()?;
8103        __struct.target_system = buf.get_u8()?;
8104        __struct.target_component = buf.get_u8()?;
8105        __struct.bus = buf.get_u8()?;
8106        __struct.len = buf.get_u8()?;
8107        for v in &mut __struct.data {
8108            let val = buf.get_u8()?;
8109            *v = val;
8110        }
8111        Ok(__struct)
8112    }
8113    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8114        let mut __tmp = BytesMut::new(bytes);
8115        #[allow(clippy::absurd_extreme_comparisons)]
8116        #[allow(unused_comparisons)]
8117        if __tmp.remaining() < Self::ENCODED_LEN {
8118            panic!(
8119                "buffer is too small (need {} bytes, but got {})",
8120                Self::ENCODED_LEN,
8121                __tmp.remaining(),
8122            )
8123        }
8124        __tmp.put_u32_le(self.id);
8125        __tmp.put_u8(self.target_system);
8126        __tmp.put_u8(self.target_component);
8127        __tmp.put_u8(self.bus);
8128        __tmp.put_u8(self.len);
8129        for val in &self.data {
8130            __tmp.put_u8(*val);
8131        }
8132        if matches!(version, MavlinkVersion::V2) {
8133            let len = __tmp.len();
8134            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8135        } else {
8136            __tmp.len()
8137        }
8138    }
8139}
8140#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8141#[doc = ""]
8142#[doc = "ID: 388"]
8143#[derive(Debug, Clone, PartialEq)]
8144#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8145#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8146#[cfg_attr(feature = "ts", derive(TS))]
8147#[cfg_attr(feature = "ts", ts(export))]
8148pub struct CAN_FILTER_MODIFY_DATA {
8149    #[doc = "filter IDs, length num_ids"]
8150    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8151    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8152    pub ids: [u16; 16],
8153    #[doc = "System ID."]
8154    pub target_system: u8,
8155    #[doc = "Component ID."]
8156    pub target_component: u8,
8157    #[doc = "bus number"]
8158    pub bus: u8,
8159    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8160    pub operation: CanFilterOp,
8161    #[doc = "number of IDs in filter list"]
8162    pub num_ids: u8,
8163}
8164impl CAN_FILTER_MODIFY_DATA {
8165    pub const ENCODED_LEN: usize = 37usize;
8166    pub const DEFAULT: Self = Self {
8167        ids: [0_u16; 16usize],
8168        target_system: 0_u8,
8169        target_component: 0_u8,
8170        bus: 0_u8,
8171        operation: CanFilterOp::DEFAULT,
8172        num_ids: 0_u8,
8173    };
8174    #[cfg(feature = "arbitrary")]
8175    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8176        use arbitrary::{Arbitrary, Unstructured};
8177        let mut buf = [0u8; 1024];
8178        rng.fill_bytes(&mut buf);
8179        let mut unstructured = Unstructured::new(&buf);
8180        Self::arbitrary(&mut unstructured).unwrap_or_default()
8181    }
8182}
8183impl Default for CAN_FILTER_MODIFY_DATA {
8184    fn default() -> Self {
8185        Self::DEFAULT.clone()
8186    }
8187}
8188impl MessageData for CAN_FILTER_MODIFY_DATA {
8189    type Message = MavMessage;
8190    const ID: u32 = 388u32;
8191    const NAME: &'static str = "CAN_FILTER_MODIFY";
8192    const EXTRA_CRC: u8 = 8u8;
8193    const ENCODED_LEN: usize = 37usize;
8194    fn deser(
8195        _version: MavlinkVersion,
8196        __input: &[u8],
8197    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8198        let avail_len = __input.len();
8199        let mut payload_buf = [0; Self::ENCODED_LEN];
8200        let mut buf = if avail_len < Self::ENCODED_LEN {
8201            payload_buf[0..avail_len].copy_from_slice(__input);
8202            Bytes::new(&payload_buf)
8203        } else {
8204            Bytes::new(__input)
8205        };
8206        let mut __struct = Self::default();
8207        for v in &mut __struct.ids {
8208            let val = buf.get_u16_le()?;
8209            *v = val;
8210        }
8211        __struct.target_system = buf.get_u8()?;
8212        __struct.target_component = buf.get_u8()?;
8213        __struct.bus = buf.get_u8()?;
8214        let tmp = buf.get_u8()?;
8215        __struct.operation =
8216            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8217                enum_type: "CanFilterOp",
8218                value: tmp as u64,
8219            })?;
8220        __struct.num_ids = buf.get_u8()?;
8221        Ok(__struct)
8222    }
8223    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8224        let mut __tmp = BytesMut::new(bytes);
8225        #[allow(clippy::absurd_extreme_comparisons)]
8226        #[allow(unused_comparisons)]
8227        if __tmp.remaining() < Self::ENCODED_LEN {
8228            panic!(
8229                "buffer is too small (need {} bytes, but got {})",
8230                Self::ENCODED_LEN,
8231                __tmp.remaining(),
8232            )
8233        }
8234        for val in &self.ids {
8235            __tmp.put_u16_le(*val);
8236        }
8237        __tmp.put_u8(self.target_system);
8238        __tmp.put_u8(self.target_component);
8239        __tmp.put_u8(self.bus);
8240        __tmp.put_u8(self.operation as u8);
8241        __tmp.put_u8(self.num_ids);
8242        if matches!(version, MavlinkVersion::V2) {
8243            let len = __tmp.len();
8244            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8245        } else {
8246            __tmp.len()
8247        }
8248    }
8249}
8250#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8251#[doc = ""]
8252#[doc = "ID: 386"]
8253#[derive(Debug, Clone, PartialEq)]
8254#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8255#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8256#[cfg_attr(feature = "ts", derive(TS))]
8257#[cfg_attr(feature = "ts", ts(export))]
8258pub struct CAN_FRAME_DATA {
8259    #[doc = "Frame ID"]
8260    pub id: u32,
8261    #[doc = "System ID."]
8262    pub target_system: u8,
8263    #[doc = "Component ID."]
8264    pub target_component: u8,
8265    #[doc = "Bus number"]
8266    pub bus: u8,
8267    #[doc = "Frame length"]
8268    pub len: u8,
8269    #[doc = "Frame data"]
8270    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8271    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8272    pub data: [u8; 8],
8273}
8274impl CAN_FRAME_DATA {
8275    pub const ENCODED_LEN: usize = 16usize;
8276    pub const DEFAULT: Self = Self {
8277        id: 0_u32,
8278        target_system: 0_u8,
8279        target_component: 0_u8,
8280        bus: 0_u8,
8281        len: 0_u8,
8282        data: [0_u8; 8usize],
8283    };
8284    #[cfg(feature = "arbitrary")]
8285    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8286        use arbitrary::{Arbitrary, Unstructured};
8287        let mut buf = [0u8; 1024];
8288        rng.fill_bytes(&mut buf);
8289        let mut unstructured = Unstructured::new(&buf);
8290        Self::arbitrary(&mut unstructured).unwrap_or_default()
8291    }
8292}
8293impl Default for CAN_FRAME_DATA {
8294    fn default() -> Self {
8295        Self::DEFAULT.clone()
8296    }
8297}
8298impl MessageData for CAN_FRAME_DATA {
8299    type Message = MavMessage;
8300    const ID: u32 = 386u32;
8301    const NAME: &'static str = "CAN_FRAME";
8302    const EXTRA_CRC: u8 = 132u8;
8303    const ENCODED_LEN: usize = 16usize;
8304    fn deser(
8305        _version: MavlinkVersion,
8306        __input: &[u8],
8307    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8308        let avail_len = __input.len();
8309        let mut payload_buf = [0; Self::ENCODED_LEN];
8310        let mut buf = if avail_len < Self::ENCODED_LEN {
8311            payload_buf[0..avail_len].copy_from_slice(__input);
8312            Bytes::new(&payload_buf)
8313        } else {
8314            Bytes::new(__input)
8315        };
8316        let mut __struct = Self::default();
8317        __struct.id = buf.get_u32_le()?;
8318        __struct.target_system = buf.get_u8()?;
8319        __struct.target_component = buf.get_u8()?;
8320        __struct.bus = buf.get_u8()?;
8321        __struct.len = buf.get_u8()?;
8322        for v in &mut __struct.data {
8323            let val = buf.get_u8()?;
8324            *v = val;
8325        }
8326        Ok(__struct)
8327    }
8328    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8329        let mut __tmp = BytesMut::new(bytes);
8330        #[allow(clippy::absurd_extreme_comparisons)]
8331        #[allow(unused_comparisons)]
8332        if __tmp.remaining() < Self::ENCODED_LEN {
8333            panic!(
8334                "buffer is too small (need {} bytes, but got {})",
8335                Self::ENCODED_LEN,
8336                __tmp.remaining(),
8337            )
8338        }
8339        __tmp.put_u32_le(self.id);
8340        __tmp.put_u8(self.target_system);
8341        __tmp.put_u8(self.target_component);
8342        __tmp.put_u8(self.bus);
8343        __tmp.put_u8(self.len);
8344        for val in &self.data {
8345            __tmp.put_u8(*val);
8346        }
8347        if matches!(version, MavlinkVersion::V2) {
8348            let len = __tmp.len();
8349            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8350        } else {
8351            __tmp.len()
8352        }
8353    }
8354}
8355#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8356#[doc = ""]
8357#[doc = "ID: 336"]
8358#[derive(Debug, Clone, PartialEq)]
8359#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8360#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8361#[cfg_attr(feature = "ts", derive(TS))]
8362#[cfg_attr(feature = "ts", ts(export))]
8363pub struct CELLULAR_CONFIG_DATA {
8364    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8365    pub enable_lte: u8,
8366    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8367    pub enable_pin: u8,
8368    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8369    #[cfg_attr(feature = "ts", ts(type = "string"))]
8370    pub pin: CharArray<16>,
8371    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8372    #[cfg_attr(feature = "ts", ts(type = "string"))]
8373    pub new_pin: CharArray<16>,
8374    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8375    #[cfg_attr(feature = "ts", ts(type = "string"))]
8376    pub apn: CharArray<32>,
8377    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8378    #[cfg_attr(feature = "ts", ts(type = "string"))]
8379    pub puk: CharArray<16>,
8380    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8381    pub roaming: u8,
8382    #[doc = "Message acceptance response (sent back to GS)."]
8383    pub response: CellularConfigResponse,
8384}
8385impl CELLULAR_CONFIG_DATA {
8386    pub const ENCODED_LEN: usize = 84usize;
8387    pub const DEFAULT: Self = Self {
8388        enable_lte: 0_u8,
8389        enable_pin: 0_u8,
8390        pin: CharArray::new([0_u8; 16usize]),
8391        new_pin: CharArray::new([0_u8; 16usize]),
8392        apn: CharArray::new([0_u8; 32usize]),
8393        puk: CharArray::new([0_u8; 16usize]),
8394        roaming: 0_u8,
8395        response: CellularConfigResponse::DEFAULT,
8396    };
8397    #[cfg(feature = "arbitrary")]
8398    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8399        use arbitrary::{Arbitrary, Unstructured};
8400        let mut buf = [0u8; 1024];
8401        rng.fill_bytes(&mut buf);
8402        let mut unstructured = Unstructured::new(&buf);
8403        Self::arbitrary(&mut unstructured).unwrap_or_default()
8404    }
8405}
8406impl Default for CELLULAR_CONFIG_DATA {
8407    fn default() -> Self {
8408        Self::DEFAULT.clone()
8409    }
8410}
8411impl MessageData for CELLULAR_CONFIG_DATA {
8412    type Message = MavMessage;
8413    const ID: u32 = 336u32;
8414    const NAME: &'static str = "CELLULAR_CONFIG";
8415    const EXTRA_CRC: u8 = 245u8;
8416    const ENCODED_LEN: usize = 84usize;
8417    fn deser(
8418        _version: MavlinkVersion,
8419        __input: &[u8],
8420    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8421        let avail_len = __input.len();
8422        let mut payload_buf = [0; Self::ENCODED_LEN];
8423        let mut buf = if avail_len < Self::ENCODED_LEN {
8424            payload_buf[0..avail_len].copy_from_slice(__input);
8425            Bytes::new(&payload_buf)
8426        } else {
8427            Bytes::new(__input)
8428        };
8429        let mut __struct = Self::default();
8430        __struct.enable_lte = buf.get_u8()?;
8431        __struct.enable_pin = buf.get_u8()?;
8432        let mut tmp = [0_u8; 16usize];
8433        for v in &mut tmp {
8434            *v = buf.get_u8()?;
8435        }
8436        __struct.pin = CharArray::new(tmp);
8437        let mut tmp = [0_u8; 16usize];
8438        for v in &mut tmp {
8439            *v = buf.get_u8()?;
8440        }
8441        __struct.new_pin = CharArray::new(tmp);
8442        let mut tmp = [0_u8; 32usize];
8443        for v in &mut tmp {
8444            *v = buf.get_u8()?;
8445        }
8446        __struct.apn = CharArray::new(tmp);
8447        let mut tmp = [0_u8; 16usize];
8448        for v in &mut tmp {
8449            *v = buf.get_u8()?;
8450        }
8451        __struct.puk = CharArray::new(tmp);
8452        __struct.roaming = buf.get_u8()?;
8453        let tmp = buf.get_u8()?;
8454        __struct.response =
8455            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8456                enum_type: "CellularConfigResponse",
8457                value: tmp as u64,
8458            })?;
8459        Ok(__struct)
8460    }
8461    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8462        let mut __tmp = BytesMut::new(bytes);
8463        #[allow(clippy::absurd_extreme_comparisons)]
8464        #[allow(unused_comparisons)]
8465        if __tmp.remaining() < Self::ENCODED_LEN {
8466            panic!(
8467                "buffer is too small (need {} bytes, but got {})",
8468                Self::ENCODED_LEN,
8469                __tmp.remaining(),
8470            )
8471        }
8472        __tmp.put_u8(self.enable_lte);
8473        __tmp.put_u8(self.enable_pin);
8474        for val in &self.pin {
8475            __tmp.put_u8(*val);
8476        }
8477        for val in &self.new_pin {
8478            __tmp.put_u8(*val);
8479        }
8480        for val in &self.apn {
8481            __tmp.put_u8(*val);
8482        }
8483        for val in &self.puk {
8484            __tmp.put_u8(*val);
8485        }
8486        __tmp.put_u8(self.roaming);
8487        __tmp.put_u8(self.response as u8);
8488        if matches!(version, MavlinkVersion::V2) {
8489            let len = __tmp.len();
8490            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8491        } else {
8492            __tmp.len()
8493        }
8494    }
8495}
8496#[doc = "Report current used cellular network status."]
8497#[doc = ""]
8498#[doc = "ID: 334"]
8499#[derive(Debug, Clone, PartialEq)]
8500#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8501#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8502#[cfg_attr(feature = "ts", derive(TS))]
8503#[cfg_attr(feature = "ts", ts(export))]
8504pub struct CELLULAR_STATUS_DATA {
8505    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8506    pub mcc: u16,
8507    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8508    pub mnc: u16,
8509    #[doc = "Location area code. If unknown, set to 0"]
8510    pub lac: u16,
8511    #[doc = "Cellular modem status"]
8512    pub status: CellularStatusFlag,
8513    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8514    pub failure_reason: CellularNetworkFailedReason,
8515    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8516    pub mavtype: CellularNetworkRadioType,
8517    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8518    pub quality: u8,
8519}
8520impl CELLULAR_STATUS_DATA {
8521    pub const ENCODED_LEN: usize = 10usize;
8522    pub const DEFAULT: Self = Self {
8523        mcc: 0_u16,
8524        mnc: 0_u16,
8525        lac: 0_u16,
8526        status: CellularStatusFlag::DEFAULT,
8527        failure_reason: CellularNetworkFailedReason::DEFAULT,
8528        mavtype: CellularNetworkRadioType::DEFAULT,
8529        quality: 0_u8,
8530    };
8531    #[cfg(feature = "arbitrary")]
8532    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8533        use arbitrary::{Arbitrary, Unstructured};
8534        let mut buf = [0u8; 1024];
8535        rng.fill_bytes(&mut buf);
8536        let mut unstructured = Unstructured::new(&buf);
8537        Self::arbitrary(&mut unstructured).unwrap_or_default()
8538    }
8539}
8540impl Default for CELLULAR_STATUS_DATA {
8541    fn default() -> Self {
8542        Self::DEFAULT.clone()
8543    }
8544}
8545impl MessageData for CELLULAR_STATUS_DATA {
8546    type Message = MavMessage;
8547    const ID: u32 = 334u32;
8548    const NAME: &'static str = "CELLULAR_STATUS";
8549    const EXTRA_CRC: u8 = 72u8;
8550    const ENCODED_LEN: usize = 10usize;
8551    fn deser(
8552        _version: MavlinkVersion,
8553        __input: &[u8],
8554    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8555        let avail_len = __input.len();
8556        let mut payload_buf = [0; Self::ENCODED_LEN];
8557        let mut buf = if avail_len < Self::ENCODED_LEN {
8558            payload_buf[0..avail_len].copy_from_slice(__input);
8559            Bytes::new(&payload_buf)
8560        } else {
8561            Bytes::new(__input)
8562        };
8563        let mut __struct = Self::default();
8564        __struct.mcc = buf.get_u16_le()?;
8565        __struct.mnc = buf.get_u16_le()?;
8566        __struct.lac = buf.get_u16_le()?;
8567        let tmp = buf.get_u8()?;
8568        __struct.status =
8569            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8570                enum_type: "CellularStatusFlag",
8571                value: tmp as u64,
8572            })?;
8573        let tmp = buf.get_u8()?;
8574        __struct.failure_reason =
8575            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8576                enum_type: "CellularNetworkFailedReason",
8577                value: tmp as u64,
8578            })?;
8579        let tmp = buf.get_u8()?;
8580        __struct.mavtype =
8581            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8582                enum_type: "CellularNetworkRadioType",
8583                value: tmp as u64,
8584            })?;
8585        __struct.quality = buf.get_u8()?;
8586        Ok(__struct)
8587    }
8588    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8589        let mut __tmp = BytesMut::new(bytes);
8590        #[allow(clippy::absurd_extreme_comparisons)]
8591        #[allow(unused_comparisons)]
8592        if __tmp.remaining() < Self::ENCODED_LEN {
8593            panic!(
8594                "buffer is too small (need {} bytes, but got {})",
8595                Self::ENCODED_LEN,
8596                __tmp.remaining(),
8597            )
8598        }
8599        __tmp.put_u16_le(self.mcc);
8600        __tmp.put_u16_le(self.mnc);
8601        __tmp.put_u16_le(self.lac);
8602        __tmp.put_u8(self.status as u8);
8603        __tmp.put_u8(self.failure_reason as u8);
8604        __tmp.put_u8(self.mavtype as u8);
8605        __tmp.put_u8(self.quality);
8606        if matches!(version, MavlinkVersion::V2) {
8607            let len = __tmp.len();
8608            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8609        } else {
8610            __tmp.len()
8611        }
8612    }
8613}
8614#[doc = "Request to control this MAV."]
8615#[doc = ""]
8616#[doc = "ID: 5"]
8617#[derive(Debug, Clone, PartialEq)]
8618#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8619#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8620#[cfg_attr(feature = "ts", derive(TS))]
8621#[cfg_attr(feature = "ts", ts(export))]
8622pub struct CHANGE_OPERATOR_CONTROL_DATA {
8623    #[doc = "System the GCS requests control for"]
8624    pub target_system: u8,
8625    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8626    pub control_request: u8,
8627    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
8628    pub version: u8,
8629    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
8630    #[cfg_attr(feature = "ts", ts(type = "string"))]
8631    pub passkey: CharArray<25>,
8632}
8633impl CHANGE_OPERATOR_CONTROL_DATA {
8634    pub const ENCODED_LEN: usize = 28usize;
8635    pub const DEFAULT: Self = Self {
8636        target_system: 0_u8,
8637        control_request: 0_u8,
8638        version: 0_u8,
8639        passkey: CharArray::new([0_u8; 25usize]),
8640    };
8641    #[cfg(feature = "arbitrary")]
8642    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8643        use arbitrary::{Arbitrary, Unstructured};
8644        let mut buf = [0u8; 1024];
8645        rng.fill_bytes(&mut buf);
8646        let mut unstructured = Unstructured::new(&buf);
8647        Self::arbitrary(&mut unstructured).unwrap_or_default()
8648    }
8649}
8650impl Default for CHANGE_OPERATOR_CONTROL_DATA {
8651    fn default() -> Self {
8652        Self::DEFAULT.clone()
8653    }
8654}
8655impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
8656    type Message = MavMessage;
8657    const ID: u32 = 5u32;
8658    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
8659    const EXTRA_CRC: u8 = 217u8;
8660    const ENCODED_LEN: usize = 28usize;
8661    fn deser(
8662        _version: MavlinkVersion,
8663        __input: &[u8],
8664    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8665        let avail_len = __input.len();
8666        let mut payload_buf = [0; Self::ENCODED_LEN];
8667        let mut buf = if avail_len < Self::ENCODED_LEN {
8668            payload_buf[0..avail_len].copy_from_slice(__input);
8669            Bytes::new(&payload_buf)
8670        } else {
8671            Bytes::new(__input)
8672        };
8673        let mut __struct = Self::default();
8674        __struct.target_system = buf.get_u8()?;
8675        __struct.control_request = buf.get_u8()?;
8676        __struct.version = buf.get_u8()?;
8677        let mut tmp = [0_u8; 25usize];
8678        for v in &mut tmp {
8679            *v = buf.get_u8()?;
8680        }
8681        __struct.passkey = CharArray::new(tmp);
8682        Ok(__struct)
8683    }
8684    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8685        let mut __tmp = BytesMut::new(bytes);
8686        #[allow(clippy::absurd_extreme_comparisons)]
8687        #[allow(unused_comparisons)]
8688        if __tmp.remaining() < Self::ENCODED_LEN {
8689            panic!(
8690                "buffer is too small (need {} bytes, but got {})",
8691                Self::ENCODED_LEN,
8692                __tmp.remaining(),
8693            )
8694        }
8695        __tmp.put_u8(self.target_system);
8696        __tmp.put_u8(self.control_request);
8697        __tmp.put_u8(self.version);
8698        for val in &self.passkey {
8699            __tmp.put_u8(*val);
8700        }
8701        if matches!(version, MavlinkVersion::V2) {
8702            let len = __tmp.len();
8703            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8704        } else {
8705            __tmp.len()
8706        }
8707    }
8708}
8709#[doc = "Accept / deny control of this MAV."]
8710#[doc = ""]
8711#[doc = "ID: 6"]
8712#[derive(Debug, Clone, PartialEq)]
8713#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8715#[cfg_attr(feature = "ts", derive(TS))]
8716#[cfg_attr(feature = "ts", ts(export))]
8717pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
8718    #[doc = "ID of the GCS this message"]
8719    pub gcs_system_id: u8,
8720    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8721    pub control_request: u8,
8722    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
8723    pub ack: u8,
8724}
8725impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
8726    pub const ENCODED_LEN: usize = 3usize;
8727    pub const DEFAULT: Self = Self {
8728        gcs_system_id: 0_u8,
8729        control_request: 0_u8,
8730        ack: 0_u8,
8731    };
8732    #[cfg(feature = "arbitrary")]
8733    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8734        use arbitrary::{Arbitrary, Unstructured};
8735        let mut buf = [0u8; 1024];
8736        rng.fill_bytes(&mut buf);
8737        let mut unstructured = Unstructured::new(&buf);
8738        Self::arbitrary(&mut unstructured).unwrap_or_default()
8739    }
8740}
8741impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8742    fn default() -> Self {
8743        Self::DEFAULT.clone()
8744    }
8745}
8746impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8747    type Message = MavMessage;
8748    const ID: u32 = 6u32;
8749    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
8750    const EXTRA_CRC: u8 = 104u8;
8751    const ENCODED_LEN: usize = 3usize;
8752    fn deser(
8753        _version: MavlinkVersion,
8754        __input: &[u8],
8755    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8756        let avail_len = __input.len();
8757        let mut payload_buf = [0; Self::ENCODED_LEN];
8758        let mut buf = if avail_len < Self::ENCODED_LEN {
8759            payload_buf[0..avail_len].copy_from_slice(__input);
8760            Bytes::new(&payload_buf)
8761        } else {
8762            Bytes::new(__input)
8763        };
8764        let mut __struct = Self::default();
8765        __struct.gcs_system_id = buf.get_u8()?;
8766        __struct.control_request = buf.get_u8()?;
8767        __struct.ack = buf.get_u8()?;
8768        Ok(__struct)
8769    }
8770    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8771        let mut __tmp = BytesMut::new(bytes);
8772        #[allow(clippy::absurd_extreme_comparisons)]
8773        #[allow(unused_comparisons)]
8774        if __tmp.remaining() < Self::ENCODED_LEN {
8775            panic!(
8776                "buffer is too small (need {} bytes, but got {})",
8777                Self::ENCODED_LEN,
8778                __tmp.remaining(),
8779            )
8780        }
8781        __tmp.put_u8(self.gcs_system_id);
8782        __tmp.put_u8(self.control_request);
8783        __tmp.put_u8(self.ack);
8784        if matches!(version, MavlinkVersion::V2) {
8785            let len = __tmp.len();
8786            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8787        } else {
8788            __tmp.len()
8789        }
8790    }
8791}
8792#[doc = "Information about a potential collision."]
8793#[doc = ""]
8794#[doc = "ID: 247"]
8795#[derive(Debug, Clone, PartialEq)]
8796#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8798#[cfg_attr(feature = "ts", derive(TS))]
8799#[cfg_attr(feature = "ts", ts(export))]
8800pub struct COLLISION_DATA {
8801    #[doc = "Unique identifier, domain based on src field"]
8802    pub id: u32,
8803    #[doc = "Estimated time until collision occurs"]
8804    pub time_to_minimum_delta: f32,
8805    #[doc = "Closest vertical distance between vehicle and object"]
8806    pub altitude_minimum_delta: f32,
8807    #[doc = "Closest horizontal distance between vehicle and object"]
8808    pub horizontal_minimum_delta: f32,
8809    #[doc = "Collision data source"]
8810    pub src: MavCollisionSrc,
8811    #[doc = "Action that is being taken to avoid this collision"]
8812    pub action: MavCollisionAction,
8813    #[doc = "How concerned the aircraft is about this collision"]
8814    pub threat_level: MavCollisionThreatLevel,
8815}
8816impl COLLISION_DATA {
8817    pub const ENCODED_LEN: usize = 19usize;
8818    pub const DEFAULT: Self = Self {
8819        id: 0_u32,
8820        time_to_minimum_delta: 0.0_f32,
8821        altitude_minimum_delta: 0.0_f32,
8822        horizontal_minimum_delta: 0.0_f32,
8823        src: MavCollisionSrc::DEFAULT,
8824        action: MavCollisionAction::DEFAULT,
8825        threat_level: MavCollisionThreatLevel::DEFAULT,
8826    };
8827    #[cfg(feature = "arbitrary")]
8828    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8829        use arbitrary::{Arbitrary, Unstructured};
8830        let mut buf = [0u8; 1024];
8831        rng.fill_bytes(&mut buf);
8832        let mut unstructured = Unstructured::new(&buf);
8833        Self::arbitrary(&mut unstructured).unwrap_or_default()
8834    }
8835}
8836impl Default for COLLISION_DATA {
8837    fn default() -> Self {
8838        Self::DEFAULT.clone()
8839    }
8840}
8841impl MessageData for COLLISION_DATA {
8842    type Message = MavMessage;
8843    const ID: u32 = 247u32;
8844    const NAME: &'static str = "COLLISION";
8845    const EXTRA_CRC: u8 = 81u8;
8846    const ENCODED_LEN: usize = 19usize;
8847    fn deser(
8848        _version: MavlinkVersion,
8849        __input: &[u8],
8850    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8851        let avail_len = __input.len();
8852        let mut payload_buf = [0; Self::ENCODED_LEN];
8853        let mut buf = if avail_len < Self::ENCODED_LEN {
8854            payload_buf[0..avail_len].copy_from_slice(__input);
8855            Bytes::new(&payload_buf)
8856        } else {
8857            Bytes::new(__input)
8858        };
8859        let mut __struct = Self::default();
8860        __struct.id = buf.get_u32_le()?;
8861        __struct.time_to_minimum_delta = buf.get_f32_le()?;
8862        __struct.altitude_minimum_delta = buf.get_f32_le()?;
8863        __struct.horizontal_minimum_delta = buf.get_f32_le()?;
8864        let tmp = buf.get_u8()?;
8865        __struct.src =
8866            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8867                enum_type: "MavCollisionSrc",
8868                value: tmp as u64,
8869            })?;
8870        let tmp = buf.get_u8()?;
8871        __struct.action =
8872            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8873                enum_type: "MavCollisionAction",
8874                value: tmp as u64,
8875            })?;
8876        let tmp = buf.get_u8()?;
8877        __struct.threat_level =
8878            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8879                enum_type: "MavCollisionThreatLevel",
8880                value: tmp as u64,
8881            })?;
8882        Ok(__struct)
8883    }
8884    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8885        let mut __tmp = BytesMut::new(bytes);
8886        #[allow(clippy::absurd_extreme_comparisons)]
8887        #[allow(unused_comparisons)]
8888        if __tmp.remaining() < Self::ENCODED_LEN {
8889            panic!(
8890                "buffer is too small (need {} bytes, but got {})",
8891                Self::ENCODED_LEN,
8892                __tmp.remaining(),
8893            )
8894        }
8895        __tmp.put_u32_le(self.id);
8896        __tmp.put_f32_le(self.time_to_minimum_delta);
8897        __tmp.put_f32_le(self.altitude_minimum_delta);
8898        __tmp.put_f32_le(self.horizontal_minimum_delta);
8899        __tmp.put_u8(self.src as u8);
8900        __tmp.put_u8(self.action as u8);
8901        __tmp.put_u8(self.threat_level as u8);
8902        if matches!(version, MavlinkVersion::V2) {
8903            let len = __tmp.len();
8904            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8905        } else {
8906            __tmp.len()
8907        }
8908    }
8909}
8910#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8911#[doc = ""]
8912#[doc = "ID: 77"]
8913#[derive(Debug, Clone, PartialEq)]
8914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8916#[cfg_attr(feature = "ts", derive(TS))]
8917#[cfg_attr(feature = "ts", ts(export))]
8918pub struct COMMAND_ACK_DATA {
8919    #[doc = "Command ID (of acknowledged command)."]
8920    pub command: MavCmd,
8921    #[doc = "Result of command."]
8922    pub result: MavResult,
8923    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
8924    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8925    pub progress: u8,
8926    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
8927    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8928    pub result_param2: i32,
8929    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8930    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8931    pub target_system: u8,
8932    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8933    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8934    pub target_component: u8,
8935}
8936impl COMMAND_ACK_DATA {
8937    pub const ENCODED_LEN: usize = 10usize;
8938    pub const DEFAULT: Self = Self {
8939        command: MavCmd::DEFAULT,
8940        result: MavResult::DEFAULT,
8941        progress: 0_u8,
8942        result_param2: 0_i32,
8943        target_system: 0_u8,
8944        target_component: 0_u8,
8945    };
8946    #[cfg(feature = "arbitrary")]
8947    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8948        use arbitrary::{Arbitrary, Unstructured};
8949        let mut buf = [0u8; 1024];
8950        rng.fill_bytes(&mut buf);
8951        let mut unstructured = Unstructured::new(&buf);
8952        Self::arbitrary(&mut unstructured).unwrap_or_default()
8953    }
8954}
8955impl Default for COMMAND_ACK_DATA {
8956    fn default() -> Self {
8957        Self::DEFAULT.clone()
8958    }
8959}
8960impl MessageData for COMMAND_ACK_DATA {
8961    type Message = MavMessage;
8962    const ID: u32 = 77u32;
8963    const NAME: &'static str = "COMMAND_ACK";
8964    const EXTRA_CRC: u8 = 143u8;
8965    const ENCODED_LEN: usize = 10usize;
8966    fn deser(
8967        _version: MavlinkVersion,
8968        __input: &[u8],
8969    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8970        let avail_len = __input.len();
8971        let mut payload_buf = [0; Self::ENCODED_LEN];
8972        let mut buf = if avail_len < Self::ENCODED_LEN {
8973            payload_buf[0..avail_len].copy_from_slice(__input);
8974            Bytes::new(&payload_buf)
8975        } else {
8976            Bytes::new(__input)
8977        };
8978        let mut __struct = Self::default();
8979        let tmp = buf.get_u16_le()?;
8980        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8981            ::mavlink_core::error::ParserError::InvalidEnum {
8982                enum_type: "MavCmd",
8983                value: tmp as u64,
8984            },
8985        )?;
8986        let tmp = buf.get_u8()?;
8987        __struct.result =
8988            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8989                enum_type: "MavResult",
8990                value: tmp as u64,
8991            })?;
8992        __struct.progress = buf.get_u8()?;
8993        __struct.result_param2 = buf.get_i32_le()?;
8994        __struct.target_system = buf.get_u8()?;
8995        __struct.target_component = buf.get_u8()?;
8996        Ok(__struct)
8997    }
8998    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8999        let mut __tmp = BytesMut::new(bytes);
9000        #[allow(clippy::absurd_extreme_comparisons)]
9001        #[allow(unused_comparisons)]
9002        if __tmp.remaining() < Self::ENCODED_LEN {
9003            panic!(
9004                "buffer is too small (need {} bytes, but got {})",
9005                Self::ENCODED_LEN,
9006                __tmp.remaining(),
9007            )
9008        }
9009        __tmp.put_u16_le(self.command as u16);
9010        __tmp.put_u8(self.result as u8);
9011        if matches!(version, MavlinkVersion::V2) {
9012            __tmp.put_u8(self.progress);
9013            __tmp.put_i32_le(self.result_param2);
9014            __tmp.put_u8(self.target_system);
9015            __tmp.put_u8(self.target_component);
9016            let len = __tmp.len();
9017            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9018        } else {
9019            __tmp.len()
9020        }
9021    }
9022}
9023#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9024#[doc = ""]
9025#[doc = "ID: 80"]
9026#[derive(Debug, Clone, PartialEq)]
9027#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9028#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9029#[cfg_attr(feature = "ts", derive(TS))]
9030#[cfg_attr(feature = "ts", ts(export))]
9031pub struct COMMAND_CANCEL_DATA {
9032    #[doc = "Command ID (of command to cancel)."]
9033    pub command: MavCmd,
9034    #[doc = "System executing long running command. Should not be broadcast (0)."]
9035    pub target_system: u8,
9036    #[doc = "Component executing long running command."]
9037    pub target_component: u8,
9038}
9039impl COMMAND_CANCEL_DATA {
9040    pub const ENCODED_LEN: usize = 4usize;
9041    pub const DEFAULT: Self = Self {
9042        command: MavCmd::DEFAULT,
9043        target_system: 0_u8,
9044        target_component: 0_u8,
9045    };
9046    #[cfg(feature = "arbitrary")]
9047    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9048        use arbitrary::{Arbitrary, Unstructured};
9049        let mut buf = [0u8; 1024];
9050        rng.fill_bytes(&mut buf);
9051        let mut unstructured = Unstructured::new(&buf);
9052        Self::arbitrary(&mut unstructured).unwrap_or_default()
9053    }
9054}
9055impl Default for COMMAND_CANCEL_DATA {
9056    fn default() -> Self {
9057        Self::DEFAULT.clone()
9058    }
9059}
9060impl MessageData for COMMAND_CANCEL_DATA {
9061    type Message = MavMessage;
9062    const ID: u32 = 80u32;
9063    const NAME: &'static str = "COMMAND_CANCEL";
9064    const EXTRA_CRC: u8 = 14u8;
9065    const ENCODED_LEN: usize = 4usize;
9066    fn deser(
9067        _version: MavlinkVersion,
9068        __input: &[u8],
9069    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9070        let avail_len = __input.len();
9071        let mut payload_buf = [0; Self::ENCODED_LEN];
9072        let mut buf = if avail_len < Self::ENCODED_LEN {
9073            payload_buf[0..avail_len].copy_from_slice(__input);
9074            Bytes::new(&payload_buf)
9075        } else {
9076            Bytes::new(__input)
9077        };
9078        let mut __struct = Self::default();
9079        let tmp = buf.get_u16_le()?;
9080        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9081            ::mavlink_core::error::ParserError::InvalidEnum {
9082                enum_type: "MavCmd",
9083                value: tmp as u64,
9084            },
9085        )?;
9086        __struct.target_system = buf.get_u8()?;
9087        __struct.target_component = buf.get_u8()?;
9088        Ok(__struct)
9089    }
9090    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9091        let mut __tmp = BytesMut::new(bytes);
9092        #[allow(clippy::absurd_extreme_comparisons)]
9093        #[allow(unused_comparisons)]
9094        if __tmp.remaining() < Self::ENCODED_LEN {
9095            panic!(
9096                "buffer is too small (need {} bytes, but got {})",
9097                Self::ENCODED_LEN,
9098                __tmp.remaining(),
9099            )
9100        }
9101        __tmp.put_u16_le(self.command as u16);
9102        __tmp.put_u8(self.target_system);
9103        __tmp.put_u8(self.target_component);
9104        if matches!(version, MavlinkVersion::V2) {
9105            let len = __tmp.len();
9106            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9107        } else {
9108            __tmp.len()
9109        }
9110    }
9111}
9112#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9113#[doc = ""]
9114#[doc = "ID: 75"]
9115#[derive(Debug, Clone, PartialEq)]
9116#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9117#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9118#[cfg_attr(feature = "ts", derive(TS))]
9119#[cfg_attr(feature = "ts", ts(export))]
9120pub struct COMMAND_INT_DATA {
9121    #[doc = "PARAM1, see MAV_CMD enum"]
9122    pub param1: f32,
9123    #[doc = "PARAM2, see MAV_CMD enum"]
9124    pub param2: f32,
9125    #[doc = "PARAM3, see MAV_CMD enum"]
9126    pub param3: f32,
9127    #[doc = "PARAM4, see MAV_CMD enum"]
9128    pub param4: f32,
9129    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9130    pub x: i32,
9131    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9132    pub y: i32,
9133    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9134    pub z: f32,
9135    #[doc = "The scheduled action for the mission item."]
9136    pub command: MavCmd,
9137    #[doc = "System ID"]
9138    pub target_system: u8,
9139    #[doc = "Component ID"]
9140    pub target_component: u8,
9141    #[doc = "The coordinate system of the COMMAND."]
9142    pub frame: MavFrame,
9143    #[doc = "Not used."]
9144    pub current: u8,
9145    #[doc = "Not used (set 0)."]
9146    pub autocontinue: u8,
9147}
9148impl COMMAND_INT_DATA {
9149    pub const ENCODED_LEN: usize = 35usize;
9150    pub const DEFAULT: Self = Self {
9151        param1: 0.0_f32,
9152        param2: 0.0_f32,
9153        param3: 0.0_f32,
9154        param4: 0.0_f32,
9155        x: 0_i32,
9156        y: 0_i32,
9157        z: 0.0_f32,
9158        command: MavCmd::DEFAULT,
9159        target_system: 0_u8,
9160        target_component: 0_u8,
9161        frame: MavFrame::DEFAULT,
9162        current: 0_u8,
9163        autocontinue: 0_u8,
9164    };
9165    #[cfg(feature = "arbitrary")]
9166    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9167        use arbitrary::{Arbitrary, Unstructured};
9168        let mut buf = [0u8; 1024];
9169        rng.fill_bytes(&mut buf);
9170        let mut unstructured = Unstructured::new(&buf);
9171        Self::arbitrary(&mut unstructured).unwrap_or_default()
9172    }
9173}
9174impl Default for COMMAND_INT_DATA {
9175    fn default() -> Self {
9176        Self::DEFAULT.clone()
9177    }
9178}
9179impl MessageData for COMMAND_INT_DATA {
9180    type Message = MavMessage;
9181    const ID: u32 = 75u32;
9182    const NAME: &'static str = "COMMAND_INT";
9183    const EXTRA_CRC: u8 = 158u8;
9184    const ENCODED_LEN: usize = 35usize;
9185    fn deser(
9186        _version: MavlinkVersion,
9187        __input: &[u8],
9188    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9189        let avail_len = __input.len();
9190        let mut payload_buf = [0; Self::ENCODED_LEN];
9191        let mut buf = if avail_len < Self::ENCODED_LEN {
9192            payload_buf[0..avail_len].copy_from_slice(__input);
9193            Bytes::new(&payload_buf)
9194        } else {
9195            Bytes::new(__input)
9196        };
9197        let mut __struct = Self::default();
9198        __struct.param1 = buf.get_f32_le()?;
9199        __struct.param2 = buf.get_f32_le()?;
9200        __struct.param3 = buf.get_f32_le()?;
9201        __struct.param4 = buf.get_f32_le()?;
9202        __struct.x = buf.get_i32_le()?;
9203        __struct.y = buf.get_i32_le()?;
9204        __struct.z = buf.get_f32_le()?;
9205        let tmp = buf.get_u16_le()?;
9206        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9207            ::mavlink_core::error::ParserError::InvalidEnum {
9208                enum_type: "MavCmd",
9209                value: tmp as u64,
9210            },
9211        )?;
9212        __struct.target_system = buf.get_u8()?;
9213        __struct.target_component = buf.get_u8()?;
9214        let tmp = buf.get_u8()?;
9215        __struct.frame =
9216            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9217                enum_type: "MavFrame",
9218                value: tmp as u64,
9219            })?;
9220        __struct.current = buf.get_u8()?;
9221        __struct.autocontinue = buf.get_u8()?;
9222        Ok(__struct)
9223    }
9224    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9225        let mut __tmp = BytesMut::new(bytes);
9226        #[allow(clippy::absurd_extreme_comparisons)]
9227        #[allow(unused_comparisons)]
9228        if __tmp.remaining() < Self::ENCODED_LEN {
9229            panic!(
9230                "buffer is too small (need {} bytes, but got {})",
9231                Self::ENCODED_LEN,
9232                __tmp.remaining(),
9233            )
9234        }
9235        __tmp.put_f32_le(self.param1);
9236        __tmp.put_f32_le(self.param2);
9237        __tmp.put_f32_le(self.param3);
9238        __tmp.put_f32_le(self.param4);
9239        __tmp.put_i32_le(self.x);
9240        __tmp.put_i32_le(self.y);
9241        __tmp.put_f32_le(self.z);
9242        __tmp.put_u16_le(self.command as u16);
9243        __tmp.put_u8(self.target_system);
9244        __tmp.put_u8(self.target_component);
9245        __tmp.put_u8(self.frame as u8);
9246        __tmp.put_u8(self.current);
9247        __tmp.put_u8(self.autocontinue);
9248        if matches!(version, MavlinkVersion::V2) {
9249            let len = __tmp.len();
9250            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9251        } else {
9252            __tmp.len()
9253        }
9254    }
9255}
9256#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9257#[doc = ""]
9258#[doc = "ID: 76"]
9259#[derive(Debug, Clone, PartialEq)]
9260#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9261#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9262#[cfg_attr(feature = "ts", derive(TS))]
9263#[cfg_attr(feature = "ts", ts(export))]
9264pub struct COMMAND_LONG_DATA {
9265    #[doc = "Parameter 1 (for the specific command)."]
9266    pub param1: f32,
9267    #[doc = "Parameter 2 (for the specific command)."]
9268    pub param2: f32,
9269    #[doc = "Parameter 3 (for the specific command)."]
9270    pub param3: f32,
9271    #[doc = "Parameter 4 (for the specific command)."]
9272    pub param4: f32,
9273    #[doc = "Parameter 5 (for the specific command)."]
9274    pub param5: f32,
9275    #[doc = "Parameter 6 (for the specific command)."]
9276    pub param6: f32,
9277    #[doc = "Parameter 7 (for the specific command)."]
9278    pub param7: f32,
9279    #[doc = "Command ID (of command to send)."]
9280    pub command: MavCmd,
9281    #[doc = "System which should execute the command"]
9282    pub target_system: u8,
9283    #[doc = "Component which should execute the command, 0 for all components"]
9284    pub target_component: u8,
9285    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9286    pub confirmation: u8,
9287}
9288impl COMMAND_LONG_DATA {
9289    pub const ENCODED_LEN: usize = 33usize;
9290    pub const DEFAULT: Self = Self {
9291        param1: 0.0_f32,
9292        param2: 0.0_f32,
9293        param3: 0.0_f32,
9294        param4: 0.0_f32,
9295        param5: 0.0_f32,
9296        param6: 0.0_f32,
9297        param7: 0.0_f32,
9298        command: MavCmd::DEFAULT,
9299        target_system: 0_u8,
9300        target_component: 0_u8,
9301        confirmation: 0_u8,
9302    };
9303    #[cfg(feature = "arbitrary")]
9304    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9305        use arbitrary::{Arbitrary, Unstructured};
9306        let mut buf = [0u8; 1024];
9307        rng.fill_bytes(&mut buf);
9308        let mut unstructured = Unstructured::new(&buf);
9309        Self::arbitrary(&mut unstructured).unwrap_or_default()
9310    }
9311}
9312impl Default for COMMAND_LONG_DATA {
9313    fn default() -> Self {
9314        Self::DEFAULT.clone()
9315    }
9316}
9317impl MessageData for COMMAND_LONG_DATA {
9318    type Message = MavMessage;
9319    const ID: u32 = 76u32;
9320    const NAME: &'static str = "COMMAND_LONG";
9321    const EXTRA_CRC: u8 = 152u8;
9322    const ENCODED_LEN: usize = 33usize;
9323    fn deser(
9324        _version: MavlinkVersion,
9325        __input: &[u8],
9326    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9327        let avail_len = __input.len();
9328        let mut payload_buf = [0; Self::ENCODED_LEN];
9329        let mut buf = if avail_len < Self::ENCODED_LEN {
9330            payload_buf[0..avail_len].copy_from_slice(__input);
9331            Bytes::new(&payload_buf)
9332        } else {
9333            Bytes::new(__input)
9334        };
9335        let mut __struct = Self::default();
9336        __struct.param1 = buf.get_f32_le()?;
9337        __struct.param2 = buf.get_f32_le()?;
9338        __struct.param3 = buf.get_f32_le()?;
9339        __struct.param4 = buf.get_f32_le()?;
9340        __struct.param5 = buf.get_f32_le()?;
9341        __struct.param6 = buf.get_f32_le()?;
9342        __struct.param7 = buf.get_f32_le()?;
9343        let tmp = buf.get_u16_le()?;
9344        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9345            ::mavlink_core::error::ParserError::InvalidEnum {
9346                enum_type: "MavCmd",
9347                value: tmp as u64,
9348            },
9349        )?;
9350        __struct.target_system = buf.get_u8()?;
9351        __struct.target_component = buf.get_u8()?;
9352        __struct.confirmation = buf.get_u8()?;
9353        Ok(__struct)
9354    }
9355    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9356        let mut __tmp = BytesMut::new(bytes);
9357        #[allow(clippy::absurd_extreme_comparisons)]
9358        #[allow(unused_comparisons)]
9359        if __tmp.remaining() < Self::ENCODED_LEN {
9360            panic!(
9361                "buffer is too small (need {} bytes, but got {})",
9362                Self::ENCODED_LEN,
9363                __tmp.remaining(),
9364            )
9365        }
9366        __tmp.put_f32_le(self.param1);
9367        __tmp.put_f32_le(self.param2);
9368        __tmp.put_f32_le(self.param3);
9369        __tmp.put_f32_le(self.param4);
9370        __tmp.put_f32_le(self.param5);
9371        __tmp.put_f32_le(self.param6);
9372        __tmp.put_f32_le(self.param7);
9373        __tmp.put_u16_le(self.command as u16);
9374        __tmp.put_u8(self.target_system);
9375        __tmp.put_u8(self.target_component);
9376        __tmp.put_u8(self.confirmation);
9377        if matches!(version, MavlinkVersion::V2) {
9378            let len = __tmp.len();
9379            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9380        } else {
9381            __tmp.len()
9382        }
9383    }
9384}
9385#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9386#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9387#[doc = ""]
9388#[doc = "ID: 395"]
9389#[derive(Debug, Clone, PartialEq)]
9390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9391#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9392#[cfg_attr(feature = "ts", derive(TS))]
9393#[cfg_attr(feature = "ts", ts(export))]
9394pub struct COMPONENT_INFORMATION_DATA {
9395    #[doc = "Timestamp (time since system boot)."]
9396    pub time_boot_ms: u32,
9397    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9398    pub general_metadata_file_crc: u32,
9399    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9400    pub peripherals_metadata_file_crc: u32,
9401    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9402    #[cfg_attr(feature = "ts", ts(type = "string"))]
9403    pub general_metadata_uri: CharArray<100>,
9404    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9405    #[cfg_attr(feature = "ts", ts(type = "string"))]
9406    pub peripherals_metadata_uri: CharArray<100>,
9407}
9408impl COMPONENT_INFORMATION_DATA {
9409    pub const ENCODED_LEN: usize = 212usize;
9410    pub const DEFAULT: Self = Self {
9411        time_boot_ms: 0_u32,
9412        general_metadata_file_crc: 0_u32,
9413        peripherals_metadata_file_crc: 0_u32,
9414        general_metadata_uri: CharArray::new([0_u8; 100usize]),
9415        peripherals_metadata_uri: CharArray::new([0_u8; 100usize]),
9416    };
9417    #[cfg(feature = "arbitrary")]
9418    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9419        use arbitrary::{Arbitrary, Unstructured};
9420        let mut buf = [0u8; 1024];
9421        rng.fill_bytes(&mut buf);
9422        let mut unstructured = Unstructured::new(&buf);
9423        Self::arbitrary(&mut unstructured).unwrap_or_default()
9424    }
9425}
9426impl Default for COMPONENT_INFORMATION_DATA {
9427    fn default() -> Self {
9428        Self::DEFAULT.clone()
9429    }
9430}
9431impl MessageData for COMPONENT_INFORMATION_DATA {
9432    type Message = MavMessage;
9433    const ID: u32 = 395u32;
9434    const NAME: &'static str = "COMPONENT_INFORMATION";
9435    const EXTRA_CRC: u8 = 0u8;
9436    const ENCODED_LEN: usize = 212usize;
9437    fn deser(
9438        _version: MavlinkVersion,
9439        __input: &[u8],
9440    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9441        let avail_len = __input.len();
9442        let mut payload_buf = [0; Self::ENCODED_LEN];
9443        let mut buf = if avail_len < Self::ENCODED_LEN {
9444            payload_buf[0..avail_len].copy_from_slice(__input);
9445            Bytes::new(&payload_buf)
9446        } else {
9447            Bytes::new(__input)
9448        };
9449        let mut __struct = Self::default();
9450        __struct.time_boot_ms = buf.get_u32_le()?;
9451        __struct.general_metadata_file_crc = buf.get_u32_le()?;
9452        __struct.peripherals_metadata_file_crc = buf.get_u32_le()?;
9453        let mut tmp = [0_u8; 100usize];
9454        for v in &mut tmp {
9455            *v = buf.get_u8()?;
9456        }
9457        __struct.general_metadata_uri = CharArray::new(tmp);
9458        let mut tmp = [0_u8; 100usize];
9459        for v in &mut tmp {
9460            *v = buf.get_u8()?;
9461        }
9462        __struct.peripherals_metadata_uri = CharArray::new(tmp);
9463        Ok(__struct)
9464    }
9465    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9466        let mut __tmp = BytesMut::new(bytes);
9467        #[allow(clippy::absurd_extreme_comparisons)]
9468        #[allow(unused_comparisons)]
9469        if __tmp.remaining() < Self::ENCODED_LEN {
9470            panic!(
9471                "buffer is too small (need {} bytes, but got {})",
9472                Self::ENCODED_LEN,
9473                __tmp.remaining(),
9474            )
9475        }
9476        __tmp.put_u32_le(self.time_boot_ms);
9477        __tmp.put_u32_le(self.general_metadata_file_crc);
9478        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9479        for val in &self.general_metadata_uri {
9480            __tmp.put_u8(*val);
9481        }
9482        for val in &self.peripherals_metadata_uri {
9483            __tmp.put_u8(*val);
9484        }
9485        if matches!(version, MavlinkVersion::V2) {
9486            let len = __tmp.len();
9487            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9488        } else {
9489            __tmp.len()
9490        }
9491    }
9492}
9493#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9494#[doc = ""]
9495#[doc = "ID: 396"]
9496#[derive(Debug, Clone, PartialEq)]
9497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9498#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9499#[cfg_attr(feature = "ts", derive(TS))]
9500#[cfg_attr(feature = "ts", ts(export))]
9501pub struct COMPONENT_INFORMATION_BASIC_DATA {
9502    #[doc = "Component capability flags"]
9503    pub capabilities: MavProtocolCapability,
9504    #[doc = "Timestamp (time since system boot)."]
9505    pub time_boot_ms: u32,
9506    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9507    pub time_manufacture_s: u32,
9508    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9509    #[cfg_attr(feature = "ts", ts(type = "string"))]
9510    pub vendor_name: CharArray<32>,
9511    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9512    #[cfg_attr(feature = "ts", ts(type = "string"))]
9513    pub model_name: CharArray<32>,
9514    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9515    #[cfg_attr(feature = "ts", ts(type = "string"))]
9516    pub software_version: CharArray<24>,
9517    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9518    #[cfg_attr(feature = "ts", ts(type = "string"))]
9519    pub hardware_version: CharArray<24>,
9520    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9521    #[cfg_attr(feature = "ts", ts(type = "string"))]
9522    pub serial_number: CharArray<32>,
9523}
9524impl COMPONENT_INFORMATION_BASIC_DATA {
9525    pub const ENCODED_LEN: usize = 160usize;
9526    pub const DEFAULT: Self = Self {
9527        capabilities: MavProtocolCapability::DEFAULT,
9528        time_boot_ms: 0_u32,
9529        time_manufacture_s: 0_u32,
9530        vendor_name: CharArray::new([0_u8; 32usize]),
9531        model_name: CharArray::new([0_u8; 32usize]),
9532        software_version: CharArray::new([0_u8; 24usize]),
9533        hardware_version: CharArray::new([0_u8; 24usize]),
9534        serial_number: CharArray::new([0_u8; 32usize]),
9535    };
9536    #[cfg(feature = "arbitrary")]
9537    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9538        use arbitrary::{Arbitrary, Unstructured};
9539        let mut buf = [0u8; 1024];
9540        rng.fill_bytes(&mut buf);
9541        let mut unstructured = Unstructured::new(&buf);
9542        Self::arbitrary(&mut unstructured).unwrap_or_default()
9543    }
9544}
9545impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9546    fn default() -> Self {
9547        Self::DEFAULT.clone()
9548    }
9549}
9550impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9551    type Message = MavMessage;
9552    const ID: u32 = 396u32;
9553    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9554    const EXTRA_CRC: u8 = 50u8;
9555    const ENCODED_LEN: usize = 160usize;
9556    fn deser(
9557        _version: MavlinkVersion,
9558        __input: &[u8],
9559    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9560        let avail_len = __input.len();
9561        let mut payload_buf = [0; Self::ENCODED_LEN];
9562        let mut buf = if avail_len < Self::ENCODED_LEN {
9563            payload_buf[0..avail_len].copy_from_slice(__input);
9564            Bytes::new(&payload_buf)
9565        } else {
9566            Bytes::new(__input)
9567        };
9568        let mut __struct = Self::default();
9569        let tmp = buf.get_u64_le()?;
9570        __struct.capabilities = MavProtocolCapability::from_bits(
9571            tmp as <MavProtocolCapability as Flags>::Bits,
9572        )
9573        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9574            flag_type: "MavProtocolCapability",
9575            value: tmp as u64,
9576        })?;
9577        __struct.time_boot_ms = buf.get_u32_le()?;
9578        __struct.time_manufacture_s = buf.get_u32_le()?;
9579        let mut tmp = [0_u8; 32usize];
9580        for v in &mut tmp {
9581            *v = buf.get_u8()?;
9582        }
9583        __struct.vendor_name = CharArray::new(tmp);
9584        let mut tmp = [0_u8; 32usize];
9585        for v in &mut tmp {
9586            *v = buf.get_u8()?;
9587        }
9588        __struct.model_name = CharArray::new(tmp);
9589        let mut tmp = [0_u8; 24usize];
9590        for v in &mut tmp {
9591            *v = buf.get_u8()?;
9592        }
9593        __struct.software_version = CharArray::new(tmp);
9594        let mut tmp = [0_u8; 24usize];
9595        for v in &mut tmp {
9596            *v = buf.get_u8()?;
9597        }
9598        __struct.hardware_version = CharArray::new(tmp);
9599        let mut tmp = [0_u8; 32usize];
9600        for v in &mut tmp {
9601            *v = buf.get_u8()?;
9602        }
9603        __struct.serial_number = CharArray::new(tmp);
9604        Ok(__struct)
9605    }
9606    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9607        let mut __tmp = BytesMut::new(bytes);
9608        #[allow(clippy::absurd_extreme_comparisons)]
9609        #[allow(unused_comparisons)]
9610        if __tmp.remaining() < Self::ENCODED_LEN {
9611            panic!(
9612                "buffer is too small (need {} bytes, but got {})",
9613                Self::ENCODED_LEN,
9614                __tmp.remaining(),
9615            )
9616        }
9617        __tmp.put_u64_le(self.capabilities.bits() as u64);
9618        __tmp.put_u32_le(self.time_boot_ms);
9619        __tmp.put_u32_le(self.time_manufacture_s);
9620        for val in &self.vendor_name {
9621            __tmp.put_u8(*val);
9622        }
9623        for val in &self.model_name {
9624            __tmp.put_u8(*val);
9625        }
9626        for val in &self.software_version {
9627            __tmp.put_u8(*val);
9628        }
9629        for val in &self.hardware_version {
9630            __tmp.put_u8(*val);
9631        }
9632        for val in &self.serial_number {
9633            __tmp.put_u8(*val);
9634        }
9635        if matches!(version, MavlinkVersion::V2) {
9636            let len = __tmp.len();
9637            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9638        } else {
9639            __tmp.len()
9640        }
9641    }
9642}
9643#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
9644#[doc = ""]
9645#[doc = "ID: 397"]
9646#[derive(Debug, Clone, PartialEq)]
9647#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9648#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9649#[cfg_attr(feature = "ts", derive(TS))]
9650#[cfg_attr(feature = "ts", ts(export))]
9651pub struct COMPONENT_METADATA_DATA {
9652    #[doc = "Timestamp (time since system boot)."]
9653    pub time_boot_ms: u32,
9654    #[doc = "CRC32 of the general metadata file."]
9655    pub file_crc: u32,
9656    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9657    #[cfg_attr(feature = "ts", ts(type = "string"))]
9658    pub uri: CharArray<100>,
9659}
9660impl COMPONENT_METADATA_DATA {
9661    pub const ENCODED_LEN: usize = 108usize;
9662    pub const DEFAULT: Self = Self {
9663        time_boot_ms: 0_u32,
9664        file_crc: 0_u32,
9665        uri: CharArray::new([0_u8; 100usize]),
9666    };
9667    #[cfg(feature = "arbitrary")]
9668    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9669        use arbitrary::{Arbitrary, Unstructured};
9670        let mut buf = [0u8; 1024];
9671        rng.fill_bytes(&mut buf);
9672        let mut unstructured = Unstructured::new(&buf);
9673        Self::arbitrary(&mut unstructured).unwrap_or_default()
9674    }
9675}
9676impl Default for COMPONENT_METADATA_DATA {
9677    fn default() -> Self {
9678        Self::DEFAULT.clone()
9679    }
9680}
9681impl MessageData for COMPONENT_METADATA_DATA {
9682    type Message = MavMessage;
9683    const ID: u32 = 397u32;
9684    const NAME: &'static str = "COMPONENT_METADATA";
9685    const EXTRA_CRC: u8 = 182u8;
9686    const ENCODED_LEN: usize = 108usize;
9687    fn deser(
9688        _version: MavlinkVersion,
9689        __input: &[u8],
9690    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9691        let avail_len = __input.len();
9692        let mut payload_buf = [0; Self::ENCODED_LEN];
9693        let mut buf = if avail_len < Self::ENCODED_LEN {
9694            payload_buf[0..avail_len].copy_from_slice(__input);
9695            Bytes::new(&payload_buf)
9696        } else {
9697            Bytes::new(__input)
9698        };
9699        let mut __struct = Self::default();
9700        __struct.time_boot_ms = buf.get_u32_le()?;
9701        __struct.file_crc = buf.get_u32_le()?;
9702        let mut tmp = [0_u8; 100usize];
9703        for v in &mut tmp {
9704            *v = buf.get_u8()?;
9705        }
9706        __struct.uri = CharArray::new(tmp);
9707        Ok(__struct)
9708    }
9709    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9710        let mut __tmp = BytesMut::new(bytes);
9711        #[allow(clippy::absurd_extreme_comparisons)]
9712        #[allow(unused_comparisons)]
9713        if __tmp.remaining() < Self::ENCODED_LEN {
9714            panic!(
9715                "buffer is too small (need {} bytes, but got {})",
9716                Self::ENCODED_LEN,
9717                __tmp.remaining(),
9718            )
9719        }
9720        __tmp.put_u32_le(self.time_boot_ms);
9721        __tmp.put_u32_le(self.file_crc);
9722        for val in &self.uri {
9723            __tmp.put_u8(*val);
9724        }
9725        if matches!(version, MavlinkVersion::V2) {
9726            let len = __tmp.len();
9727            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9728        } else {
9729            __tmp.len()
9730        }
9731    }
9732}
9733#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
9734#[doc = ""]
9735#[doc = "ID: 146"]
9736#[derive(Debug, Clone, PartialEq)]
9737#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9738#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9739#[cfg_attr(feature = "ts", derive(TS))]
9740#[cfg_attr(feature = "ts", ts(export))]
9741pub struct CONTROL_SYSTEM_STATE_DATA {
9742    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9743    pub time_usec: u64,
9744    #[doc = "X acceleration in body frame"]
9745    pub x_acc: f32,
9746    #[doc = "Y acceleration in body frame"]
9747    pub y_acc: f32,
9748    #[doc = "Z acceleration in body frame"]
9749    pub z_acc: f32,
9750    #[doc = "X velocity in body frame"]
9751    pub x_vel: f32,
9752    #[doc = "Y velocity in body frame"]
9753    pub y_vel: f32,
9754    #[doc = "Z velocity in body frame"]
9755    pub z_vel: f32,
9756    #[doc = "X position in local frame"]
9757    pub x_pos: f32,
9758    #[doc = "Y position in local frame"]
9759    pub y_pos: f32,
9760    #[doc = "Z position in local frame"]
9761    pub z_pos: f32,
9762    #[doc = "Airspeed, set to -1 if unknown"]
9763    pub airspeed: f32,
9764    #[doc = "Variance of body velocity estimate"]
9765    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9766    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9767    pub vel_variance: [f32; 3],
9768    #[doc = "Variance in local position"]
9769    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9770    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9771    pub pos_variance: [f32; 3],
9772    #[doc = "The attitude, represented as Quaternion"]
9773    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9774    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9775    pub q: [f32; 4],
9776    #[doc = "Angular rate in roll axis"]
9777    pub roll_rate: f32,
9778    #[doc = "Angular rate in pitch axis"]
9779    pub pitch_rate: f32,
9780    #[doc = "Angular rate in yaw axis"]
9781    pub yaw_rate: f32,
9782}
9783impl CONTROL_SYSTEM_STATE_DATA {
9784    pub const ENCODED_LEN: usize = 100usize;
9785    pub const DEFAULT: Self = Self {
9786        time_usec: 0_u64,
9787        x_acc: 0.0_f32,
9788        y_acc: 0.0_f32,
9789        z_acc: 0.0_f32,
9790        x_vel: 0.0_f32,
9791        y_vel: 0.0_f32,
9792        z_vel: 0.0_f32,
9793        x_pos: 0.0_f32,
9794        y_pos: 0.0_f32,
9795        z_pos: 0.0_f32,
9796        airspeed: 0.0_f32,
9797        vel_variance: [0.0_f32; 3usize],
9798        pos_variance: [0.0_f32; 3usize],
9799        q: [0.0_f32; 4usize],
9800        roll_rate: 0.0_f32,
9801        pitch_rate: 0.0_f32,
9802        yaw_rate: 0.0_f32,
9803    };
9804    #[cfg(feature = "arbitrary")]
9805    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9806        use arbitrary::{Arbitrary, Unstructured};
9807        let mut buf = [0u8; 1024];
9808        rng.fill_bytes(&mut buf);
9809        let mut unstructured = Unstructured::new(&buf);
9810        Self::arbitrary(&mut unstructured).unwrap_or_default()
9811    }
9812}
9813impl Default for CONTROL_SYSTEM_STATE_DATA {
9814    fn default() -> Self {
9815        Self::DEFAULT.clone()
9816    }
9817}
9818impl MessageData for CONTROL_SYSTEM_STATE_DATA {
9819    type Message = MavMessage;
9820    const ID: u32 = 146u32;
9821    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
9822    const EXTRA_CRC: u8 = 103u8;
9823    const ENCODED_LEN: usize = 100usize;
9824    fn deser(
9825        _version: MavlinkVersion,
9826        __input: &[u8],
9827    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9828        let avail_len = __input.len();
9829        let mut payload_buf = [0; Self::ENCODED_LEN];
9830        let mut buf = if avail_len < Self::ENCODED_LEN {
9831            payload_buf[0..avail_len].copy_from_slice(__input);
9832            Bytes::new(&payload_buf)
9833        } else {
9834            Bytes::new(__input)
9835        };
9836        let mut __struct = Self::default();
9837        __struct.time_usec = buf.get_u64_le()?;
9838        __struct.x_acc = buf.get_f32_le()?;
9839        __struct.y_acc = buf.get_f32_le()?;
9840        __struct.z_acc = buf.get_f32_le()?;
9841        __struct.x_vel = buf.get_f32_le()?;
9842        __struct.y_vel = buf.get_f32_le()?;
9843        __struct.z_vel = buf.get_f32_le()?;
9844        __struct.x_pos = buf.get_f32_le()?;
9845        __struct.y_pos = buf.get_f32_le()?;
9846        __struct.z_pos = buf.get_f32_le()?;
9847        __struct.airspeed = buf.get_f32_le()?;
9848        for v in &mut __struct.vel_variance {
9849            let val = buf.get_f32_le()?;
9850            *v = val;
9851        }
9852        for v in &mut __struct.pos_variance {
9853            let val = buf.get_f32_le()?;
9854            *v = val;
9855        }
9856        for v in &mut __struct.q {
9857            let val = buf.get_f32_le()?;
9858            *v = val;
9859        }
9860        __struct.roll_rate = buf.get_f32_le()?;
9861        __struct.pitch_rate = buf.get_f32_le()?;
9862        __struct.yaw_rate = buf.get_f32_le()?;
9863        Ok(__struct)
9864    }
9865    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9866        let mut __tmp = BytesMut::new(bytes);
9867        #[allow(clippy::absurd_extreme_comparisons)]
9868        #[allow(unused_comparisons)]
9869        if __tmp.remaining() < Self::ENCODED_LEN {
9870            panic!(
9871                "buffer is too small (need {} bytes, but got {})",
9872                Self::ENCODED_LEN,
9873                __tmp.remaining(),
9874            )
9875        }
9876        __tmp.put_u64_le(self.time_usec);
9877        __tmp.put_f32_le(self.x_acc);
9878        __tmp.put_f32_le(self.y_acc);
9879        __tmp.put_f32_le(self.z_acc);
9880        __tmp.put_f32_le(self.x_vel);
9881        __tmp.put_f32_le(self.y_vel);
9882        __tmp.put_f32_le(self.z_vel);
9883        __tmp.put_f32_le(self.x_pos);
9884        __tmp.put_f32_le(self.y_pos);
9885        __tmp.put_f32_le(self.z_pos);
9886        __tmp.put_f32_le(self.airspeed);
9887        for val in &self.vel_variance {
9888            __tmp.put_f32_le(*val);
9889        }
9890        for val in &self.pos_variance {
9891            __tmp.put_f32_le(*val);
9892        }
9893        for val in &self.q {
9894            __tmp.put_f32_le(*val);
9895        }
9896        __tmp.put_f32_le(self.roll_rate);
9897        __tmp.put_f32_le(self.pitch_rate);
9898        __tmp.put_f32_le(self.yaw_rate);
9899        if matches!(version, MavlinkVersion::V2) {
9900            let len = __tmp.len();
9901            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9902        } else {
9903            __tmp.len()
9904        }
9905    }
9906}
9907#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
9908#[doc = ""]
9909#[doc = "ID: 411"]
9910#[derive(Debug, Clone, PartialEq)]
9911#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9912#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9913#[cfg_attr(feature = "ts", derive(TS))]
9914#[cfg_attr(feature = "ts", ts(export))]
9915pub struct CURRENT_EVENT_SEQUENCE_DATA {
9916    #[doc = "Sequence number."]
9917    pub sequence: u16,
9918    #[doc = "Flag bitset."]
9919    pub flags: MavEventCurrentSequenceFlags,
9920}
9921impl CURRENT_EVENT_SEQUENCE_DATA {
9922    pub const ENCODED_LEN: usize = 3usize;
9923    pub const DEFAULT: Self = Self {
9924        sequence: 0_u16,
9925        flags: MavEventCurrentSequenceFlags::DEFAULT,
9926    };
9927    #[cfg(feature = "arbitrary")]
9928    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9929        use arbitrary::{Arbitrary, Unstructured};
9930        let mut buf = [0u8; 1024];
9931        rng.fill_bytes(&mut buf);
9932        let mut unstructured = Unstructured::new(&buf);
9933        Self::arbitrary(&mut unstructured).unwrap_or_default()
9934    }
9935}
9936impl Default for CURRENT_EVENT_SEQUENCE_DATA {
9937    fn default() -> Self {
9938        Self::DEFAULT.clone()
9939    }
9940}
9941impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
9942    type Message = MavMessage;
9943    const ID: u32 = 411u32;
9944    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
9945    const EXTRA_CRC: u8 = 106u8;
9946    const ENCODED_LEN: usize = 3usize;
9947    fn deser(
9948        _version: MavlinkVersion,
9949        __input: &[u8],
9950    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9951        let avail_len = __input.len();
9952        let mut payload_buf = [0; Self::ENCODED_LEN];
9953        let mut buf = if avail_len < Self::ENCODED_LEN {
9954            payload_buf[0..avail_len].copy_from_slice(__input);
9955            Bytes::new(&payload_buf)
9956        } else {
9957            Bytes::new(__input)
9958        };
9959        let mut __struct = Self::default();
9960        __struct.sequence = buf.get_u16_le()?;
9961        let tmp = buf.get_u8()?;
9962        __struct.flags =
9963            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9964                enum_type: "MavEventCurrentSequenceFlags",
9965                value: tmp as u64,
9966            })?;
9967        Ok(__struct)
9968    }
9969    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9970        let mut __tmp = BytesMut::new(bytes);
9971        #[allow(clippy::absurd_extreme_comparisons)]
9972        #[allow(unused_comparisons)]
9973        if __tmp.remaining() < Self::ENCODED_LEN {
9974            panic!(
9975                "buffer is too small (need {} bytes, but got {})",
9976                Self::ENCODED_LEN,
9977                __tmp.remaining(),
9978            )
9979        }
9980        __tmp.put_u16_le(self.sequence);
9981        __tmp.put_u8(self.flags as u8);
9982        if matches!(version, MavlinkVersion::V2) {
9983            let len = __tmp.len();
9984            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9985        } else {
9986            __tmp.len()
9987        }
9988    }
9989}
9990#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
9991#[doc = ""]
9992#[doc = "ID: 436"]
9993#[derive(Debug, Clone, PartialEq)]
9994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9995#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9996#[cfg_attr(feature = "ts", derive(TS))]
9997#[cfg_attr(feature = "ts", ts(export))]
9998pub struct CURRENT_MODE_DATA {
9999    #[doc = "A bitfield for use for autopilot-specific flags"]
10000    pub custom_mode: u32,
10001    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10002    pub intended_custom_mode: u32,
10003    #[doc = "Standard mode."]
10004    pub standard_mode: MavStandardMode,
10005}
10006impl CURRENT_MODE_DATA {
10007    pub const ENCODED_LEN: usize = 9usize;
10008    pub const DEFAULT: Self = Self {
10009        custom_mode: 0_u32,
10010        intended_custom_mode: 0_u32,
10011        standard_mode: MavStandardMode::DEFAULT,
10012    };
10013    #[cfg(feature = "arbitrary")]
10014    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10015        use arbitrary::{Arbitrary, Unstructured};
10016        let mut buf = [0u8; 1024];
10017        rng.fill_bytes(&mut buf);
10018        let mut unstructured = Unstructured::new(&buf);
10019        Self::arbitrary(&mut unstructured).unwrap_or_default()
10020    }
10021}
10022impl Default for CURRENT_MODE_DATA {
10023    fn default() -> Self {
10024        Self::DEFAULT.clone()
10025    }
10026}
10027impl MessageData for CURRENT_MODE_DATA {
10028    type Message = MavMessage;
10029    const ID: u32 = 436u32;
10030    const NAME: &'static str = "CURRENT_MODE";
10031    const EXTRA_CRC: u8 = 193u8;
10032    const ENCODED_LEN: usize = 9usize;
10033    fn deser(
10034        _version: MavlinkVersion,
10035        __input: &[u8],
10036    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10037        let avail_len = __input.len();
10038        let mut payload_buf = [0; Self::ENCODED_LEN];
10039        let mut buf = if avail_len < Self::ENCODED_LEN {
10040            payload_buf[0..avail_len].copy_from_slice(__input);
10041            Bytes::new(&payload_buf)
10042        } else {
10043            Bytes::new(__input)
10044        };
10045        let mut __struct = Self::default();
10046        __struct.custom_mode = buf.get_u32_le()?;
10047        __struct.intended_custom_mode = buf.get_u32_le()?;
10048        let tmp = buf.get_u8()?;
10049        __struct.standard_mode =
10050            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10051                enum_type: "MavStandardMode",
10052                value: tmp as u64,
10053            })?;
10054        Ok(__struct)
10055    }
10056    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10057        let mut __tmp = BytesMut::new(bytes);
10058        #[allow(clippy::absurd_extreme_comparisons)]
10059        #[allow(unused_comparisons)]
10060        if __tmp.remaining() < Self::ENCODED_LEN {
10061            panic!(
10062                "buffer is too small (need {} bytes, but got {})",
10063                Self::ENCODED_LEN,
10064                __tmp.remaining(),
10065            )
10066        }
10067        __tmp.put_u32_le(self.custom_mode);
10068        __tmp.put_u32_le(self.intended_custom_mode);
10069        __tmp.put_u8(self.standard_mode as u8);
10070        if matches!(version, MavlinkVersion::V2) {
10071            let len = __tmp.len();
10072            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10073        } else {
10074            __tmp.len()
10075        }
10076    }
10077}
10078#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10079#[doc = "Data stream status information."]
10080#[doc = ""]
10081#[doc = "ID: 67"]
10082#[derive(Debug, Clone, PartialEq)]
10083#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10084#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10085#[cfg_attr(feature = "ts", derive(TS))]
10086#[cfg_attr(feature = "ts", ts(export))]
10087pub struct DATA_STREAM_DATA {
10088    #[doc = "The message rate"]
10089    pub message_rate: u16,
10090    #[doc = "The ID of the requested data stream"]
10091    pub stream_id: u8,
10092    #[doc = "1 stream is enabled, 0 stream is stopped."]
10093    pub on_off: u8,
10094}
10095impl DATA_STREAM_DATA {
10096    pub const ENCODED_LEN: usize = 4usize;
10097    pub const DEFAULT: Self = Self {
10098        message_rate: 0_u16,
10099        stream_id: 0_u8,
10100        on_off: 0_u8,
10101    };
10102    #[cfg(feature = "arbitrary")]
10103    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10104        use arbitrary::{Arbitrary, Unstructured};
10105        let mut buf = [0u8; 1024];
10106        rng.fill_bytes(&mut buf);
10107        let mut unstructured = Unstructured::new(&buf);
10108        Self::arbitrary(&mut unstructured).unwrap_or_default()
10109    }
10110}
10111impl Default for DATA_STREAM_DATA {
10112    fn default() -> Self {
10113        Self::DEFAULT.clone()
10114    }
10115}
10116impl MessageData for DATA_STREAM_DATA {
10117    type Message = MavMessage;
10118    const ID: u32 = 67u32;
10119    const NAME: &'static str = "DATA_STREAM";
10120    const EXTRA_CRC: u8 = 21u8;
10121    const ENCODED_LEN: usize = 4usize;
10122    fn deser(
10123        _version: MavlinkVersion,
10124        __input: &[u8],
10125    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10126        let avail_len = __input.len();
10127        let mut payload_buf = [0; Self::ENCODED_LEN];
10128        let mut buf = if avail_len < Self::ENCODED_LEN {
10129            payload_buf[0..avail_len].copy_from_slice(__input);
10130            Bytes::new(&payload_buf)
10131        } else {
10132            Bytes::new(__input)
10133        };
10134        let mut __struct = Self::default();
10135        __struct.message_rate = buf.get_u16_le()?;
10136        __struct.stream_id = buf.get_u8()?;
10137        __struct.on_off = buf.get_u8()?;
10138        Ok(__struct)
10139    }
10140    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10141        let mut __tmp = BytesMut::new(bytes);
10142        #[allow(clippy::absurd_extreme_comparisons)]
10143        #[allow(unused_comparisons)]
10144        if __tmp.remaining() < Self::ENCODED_LEN {
10145            panic!(
10146                "buffer is too small (need {} bytes, but got {})",
10147                Self::ENCODED_LEN,
10148                __tmp.remaining(),
10149            )
10150        }
10151        __tmp.put_u16_le(self.message_rate);
10152        __tmp.put_u8(self.stream_id);
10153        __tmp.put_u8(self.on_off);
10154        if matches!(version, MavlinkVersion::V2) {
10155            let len = __tmp.len();
10156            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10157        } else {
10158            __tmp.len()
10159        }
10160    }
10161}
10162#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10163#[doc = ""]
10164#[doc = "ID: 130"]
10165#[derive(Debug, Clone, PartialEq)]
10166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10168#[cfg_attr(feature = "ts", derive(TS))]
10169#[cfg_attr(feature = "ts", ts(export))]
10170pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10171    #[doc = "total data size (set on ACK only)."]
10172    pub size: u32,
10173    #[doc = "Width of a matrix or image."]
10174    pub width: u16,
10175    #[doc = "Height of a matrix or image."]
10176    pub height: u16,
10177    #[doc = "Number of packets being sent (set on ACK only)."]
10178    pub packets: u16,
10179    #[doc = "Type of requested/acknowledged data."]
10180    pub mavtype: MavlinkDataStreamType,
10181    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10182    pub payload: u8,
10183    #[doc = "JPEG quality. Values: [1-100]."]
10184    pub jpg_quality: u8,
10185}
10186impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10187    pub const ENCODED_LEN: usize = 13usize;
10188    pub const DEFAULT: Self = Self {
10189        size: 0_u32,
10190        width: 0_u16,
10191        height: 0_u16,
10192        packets: 0_u16,
10193        mavtype: MavlinkDataStreamType::DEFAULT,
10194        payload: 0_u8,
10195        jpg_quality: 0_u8,
10196    };
10197    #[cfg(feature = "arbitrary")]
10198    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10199        use arbitrary::{Arbitrary, Unstructured};
10200        let mut buf = [0u8; 1024];
10201        rng.fill_bytes(&mut buf);
10202        let mut unstructured = Unstructured::new(&buf);
10203        Self::arbitrary(&mut unstructured).unwrap_or_default()
10204    }
10205}
10206impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10207    fn default() -> Self {
10208        Self::DEFAULT.clone()
10209    }
10210}
10211impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10212    type Message = MavMessage;
10213    const ID: u32 = 130u32;
10214    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10215    const EXTRA_CRC: u8 = 29u8;
10216    const ENCODED_LEN: usize = 13usize;
10217    fn deser(
10218        _version: MavlinkVersion,
10219        __input: &[u8],
10220    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10221        let avail_len = __input.len();
10222        let mut payload_buf = [0; Self::ENCODED_LEN];
10223        let mut buf = if avail_len < Self::ENCODED_LEN {
10224            payload_buf[0..avail_len].copy_from_slice(__input);
10225            Bytes::new(&payload_buf)
10226        } else {
10227            Bytes::new(__input)
10228        };
10229        let mut __struct = Self::default();
10230        __struct.size = buf.get_u32_le()?;
10231        __struct.width = buf.get_u16_le()?;
10232        __struct.height = buf.get_u16_le()?;
10233        __struct.packets = buf.get_u16_le()?;
10234        let tmp = buf.get_u8()?;
10235        __struct.mavtype =
10236            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10237                enum_type: "MavlinkDataStreamType",
10238                value: tmp as u64,
10239            })?;
10240        __struct.payload = buf.get_u8()?;
10241        __struct.jpg_quality = buf.get_u8()?;
10242        Ok(__struct)
10243    }
10244    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10245        let mut __tmp = BytesMut::new(bytes);
10246        #[allow(clippy::absurd_extreme_comparisons)]
10247        #[allow(unused_comparisons)]
10248        if __tmp.remaining() < Self::ENCODED_LEN {
10249            panic!(
10250                "buffer is too small (need {} bytes, but got {})",
10251                Self::ENCODED_LEN,
10252                __tmp.remaining(),
10253            )
10254        }
10255        __tmp.put_u32_le(self.size);
10256        __tmp.put_u16_le(self.width);
10257        __tmp.put_u16_le(self.height);
10258        __tmp.put_u16_le(self.packets);
10259        __tmp.put_u8(self.mavtype as u8);
10260        __tmp.put_u8(self.payload);
10261        __tmp.put_u8(self.jpg_quality);
10262        if matches!(version, MavlinkVersion::V2) {
10263            let len = __tmp.len();
10264            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10265        } else {
10266            __tmp.len()
10267        }
10268    }
10269}
10270#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10271#[doc = ""]
10272#[doc = "ID: 254"]
10273#[derive(Debug, Clone, PartialEq)]
10274#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10275#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10276#[cfg_attr(feature = "ts", derive(TS))]
10277#[cfg_attr(feature = "ts", ts(export))]
10278pub struct DEBUG_DATA {
10279    #[doc = "Timestamp (time since system boot)."]
10280    pub time_boot_ms: u32,
10281    #[doc = "DEBUG value"]
10282    pub value: f32,
10283    #[doc = "index of debug variable"]
10284    pub ind: u8,
10285}
10286impl DEBUG_DATA {
10287    pub const ENCODED_LEN: usize = 9usize;
10288    pub const DEFAULT: Self = Self {
10289        time_boot_ms: 0_u32,
10290        value: 0.0_f32,
10291        ind: 0_u8,
10292    };
10293    #[cfg(feature = "arbitrary")]
10294    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10295        use arbitrary::{Arbitrary, Unstructured};
10296        let mut buf = [0u8; 1024];
10297        rng.fill_bytes(&mut buf);
10298        let mut unstructured = Unstructured::new(&buf);
10299        Self::arbitrary(&mut unstructured).unwrap_or_default()
10300    }
10301}
10302impl Default for DEBUG_DATA {
10303    fn default() -> Self {
10304        Self::DEFAULT.clone()
10305    }
10306}
10307impl MessageData for DEBUG_DATA {
10308    type Message = MavMessage;
10309    const ID: u32 = 254u32;
10310    const NAME: &'static str = "DEBUG";
10311    const EXTRA_CRC: u8 = 46u8;
10312    const ENCODED_LEN: usize = 9usize;
10313    fn deser(
10314        _version: MavlinkVersion,
10315        __input: &[u8],
10316    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10317        let avail_len = __input.len();
10318        let mut payload_buf = [0; Self::ENCODED_LEN];
10319        let mut buf = if avail_len < Self::ENCODED_LEN {
10320            payload_buf[0..avail_len].copy_from_slice(__input);
10321            Bytes::new(&payload_buf)
10322        } else {
10323            Bytes::new(__input)
10324        };
10325        let mut __struct = Self::default();
10326        __struct.time_boot_ms = buf.get_u32_le()?;
10327        __struct.value = buf.get_f32_le()?;
10328        __struct.ind = buf.get_u8()?;
10329        Ok(__struct)
10330    }
10331    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10332        let mut __tmp = BytesMut::new(bytes);
10333        #[allow(clippy::absurd_extreme_comparisons)]
10334        #[allow(unused_comparisons)]
10335        if __tmp.remaining() < Self::ENCODED_LEN {
10336            panic!(
10337                "buffer is too small (need {} bytes, but got {})",
10338                Self::ENCODED_LEN,
10339                __tmp.remaining(),
10340            )
10341        }
10342        __tmp.put_u32_le(self.time_boot_ms);
10343        __tmp.put_f32_le(self.value);
10344        __tmp.put_u8(self.ind);
10345        if matches!(version, MavlinkVersion::V2) {
10346            let len = __tmp.len();
10347            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10348        } else {
10349            __tmp.len()
10350        }
10351    }
10352}
10353#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10354#[doc = ""]
10355#[doc = "ID: 350"]
10356#[derive(Debug, Clone, PartialEq)]
10357#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10358#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10359#[cfg_attr(feature = "ts", derive(TS))]
10360#[cfg_attr(feature = "ts", ts(export))]
10361pub struct DEBUG_FLOAT_ARRAY_DATA {
10362    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10363    pub time_usec: u64,
10364    #[doc = "Unique ID used to discriminate between arrays"]
10365    pub array_id: u16,
10366    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10367    #[cfg_attr(feature = "ts", ts(type = "string"))]
10368    pub name: CharArray<10>,
10369    #[doc = "data"]
10370    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10371    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10372    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10373    pub data: [f32; 58],
10374}
10375impl DEBUG_FLOAT_ARRAY_DATA {
10376    pub const ENCODED_LEN: usize = 252usize;
10377    pub const DEFAULT: Self = Self {
10378        time_usec: 0_u64,
10379        array_id: 0_u16,
10380        name: CharArray::new([0_u8; 10usize]),
10381        data: [0.0_f32; 58usize],
10382    };
10383    #[cfg(feature = "arbitrary")]
10384    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10385        use arbitrary::{Arbitrary, Unstructured};
10386        let mut buf = [0u8; 1024];
10387        rng.fill_bytes(&mut buf);
10388        let mut unstructured = Unstructured::new(&buf);
10389        Self::arbitrary(&mut unstructured).unwrap_or_default()
10390    }
10391}
10392impl Default for DEBUG_FLOAT_ARRAY_DATA {
10393    fn default() -> Self {
10394        Self::DEFAULT.clone()
10395    }
10396}
10397impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10398    type Message = MavMessage;
10399    const ID: u32 = 350u32;
10400    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10401    const EXTRA_CRC: u8 = 232u8;
10402    const ENCODED_LEN: usize = 252usize;
10403    fn deser(
10404        _version: MavlinkVersion,
10405        __input: &[u8],
10406    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10407        let avail_len = __input.len();
10408        let mut payload_buf = [0; Self::ENCODED_LEN];
10409        let mut buf = if avail_len < Self::ENCODED_LEN {
10410            payload_buf[0..avail_len].copy_from_slice(__input);
10411            Bytes::new(&payload_buf)
10412        } else {
10413            Bytes::new(__input)
10414        };
10415        let mut __struct = Self::default();
10416        __struct.time_usec = buf.get_u64_le()?;
10417        __struct.array_id = buf.get_u16_le()?;
10418        let mut tmp = [0_u8; 10usize];
10419        for v in &mut tmp {
10420            *v = buf.get_u8()?;
10421        }
10422        __struct.name = CharArray::new(tmp);
10423        for v in &mut __struct.data {
10424            let val = buf.get_f32_le()?;
10425            *v = val;
10426        }
10427        Ok(__struct)
10428    }
10429    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10430        let mut __tmp = BytesMut::new(bytes);
10431        #[allow(clippy::absurd_extreme_comparisons)]
10432        #[allow(unused_comparisons)]
10433        if __tmp.remaining() < Self::ENCODED_LEN {
10434            panic!(
10435                "buffer is too small (need {} bytes, but got {})",
10436                Self::ENCODED_LEN,
10437                __tmp.remaining(),
10438            )
10439        }
10440        __tmp.put_u64_le(self.time_usec);
10441        __tmp.put_u16_le(self.array_id);
10442        for val in &self.name {
10443            __tmp.put_u8(*val);
10444        }
10445        if matches!(version, MavlinkVersion::V2) {
10446            for val in &self.data {
10447                __tmp.put_f32_le(*val);
10448            }
10449            let len = __tmp.len();
10450            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10451        } else {
10452            __tmp.len()
10453        }
10454    }
10455}
10456#[doc = "To debug something using a named 3D vector."]
10457#[doc = ""]
10458#[doc = "ID: 250"]
10459#[derive(Debug, Clone, PartialEq)]
10460#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10461#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10462#[cfg_attr(feature = "ts", derive(TS))]
10463#[cfg_attr(feature = "ts", ts(export))]
10464pub struct DEBUG_VECT_DATA {
10465    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10466    pub time_usec: u64,
10467    #[doc = "x"]
10468    pub x: f32,
10469    #[doc = "y"]
10470    pub y: f32,
10471    #[doc = "z"]
10472    pub z: f32,
10473    #[doc = "Name"]
10474    #[cfg_attr(feature = "ts", ts(type = "string"))]
10475    pub name: CharArray<10>,
10476}
10477impl DEBUG_VECT_DATA {
10478    pub const ENCODED_LEN: usize = 30usize;
10479    pub const DEFAULT: Self = Self {
10480        time_usec: 0_u64,
10481        x: 0.0_f32,
10482        y: 0.0_f32,
10483        z: 0.0_f32,
10484        name: CharArray::new([0_u8; 10usize]),
10485    };
10486    #[cfg(feature = "arbitrary")]
10487    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10488        use arbitrary::{Arbitrary, Unstructured};
10489        let mut buf = [0u8; 1024];
10490        rng.fill_bytes(&mut buf);
10491        let mut unstructured = Unstructured::new(&buf);
10492        Self::arbitrary(&mut unstructured).unwrap_or_default()
10493    }
10494}
10495impl Default for DEBUG_VECT_DATA {
10496    fn default() -> Self {
10497        Self::DEFAULT.clone()
10498    }
10499}
10500impl MessageData for DEBUG_VECT_DATA {
10501    type Message = MavMessage;
10502    const ID: u32 = 250u32;
10503    const NAME: &'static str = "DEBUG_VECT";
10504    const EXTRA_CRC: u8 = 49u8;
10505    const ENCODED_LEN: usize = 30usize;
10506    fn deser(
10507        _version: MavlinkVersion,
10508        __input: &[u8],
10509    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10510        let avail_len = __input.len();
10511        let mut payload_buf = [0; Self::ENCODED_LEN];
10512        let mut buf = if avail_len < Self::ENCODED_LEN {
10513            payload_buf[0..avail_len].copy_from_slice(__input);
10514            Bytes::new(&payload_buf)
10515        } else {
10516            Bytes::new(__input)
10517        };
10518        let mut __struct = Self::default();
10519        __struct.time_usec = buf.get_u64_le()?;
10520        __struct.x = buf.get_f32_le()?;
10521        __struct.y = buf.get_f32_le()?;
10522        __struct.z = buf.get_f32_le()?;
10523        let mut tmp = [0_u8; 10usize];
10524        for v in &mut tmp {
10525            *v = buf.get_u8()?;
10526        }
10527        __struct.name = CharArray::new(tmp);
10528        Ok(__struct)
10529    }
10530    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10531        let mut __tmp = BytesMut::new(bytes);
10532        #[allow(clippy::absurd_extreme_comparisons)]
10533        #[allow(unused_comparisons)]
10534        if __tmp.remaining() < Self::ENCODED_LEN {
10535            panic!(
10536                "buffer is too small (need {} bytes, but got {})",
10537                Self::ENCODED_LEN,
10538                __tmp.remaining(),
10539            )
10540        }
10541        __tmp.put_u64_le(self.time_usec);
10542        __tmp.put_f32_le(self.x);
10543        __tmp.put_f32_le(self.y);
10544        __tmp.put_f32_le(self.z);
10545        for val in &self.name {
10546            __tmp.put_u8(*val);
10547        }
10548        if matches!(version, MavlinkVersion::V2) {
10549            let len = __tmp.len();
10550            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10551        } else {
10552            __tmp.len()
10553        }
10554    }
10555}
10556#[doc = "Distance sensor information for an onboard rangefinder."]
10557#[doc = ""]
10558#[doc = "ID: 132"]
10559#[derive(Debug, Clone, PartialEq)]
10560#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10561#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10562#[cfg_attr(feature = "ts", derive(TS))]
10563#[cfg_attr(feature = "ts", ts(export))]
10564pub struct DISTANCE_SENSOR_DATA {
10565    #[doc = "Timestamp (time since system boot)."]
10566    pub time_boot_ms: u32,
10567    #[doc = "Minimum distance the sensor can measure"]
10568    pub min_distance: u16,
10569    #[doc = "Maximum distance the sensor can measure"]
10570    pub max_distance: u16,
10571    #[doc = "Current distance reading"]
10572    pub current_distance: u16,
10573    #[doc = "Type of distance sensor."]
10574    pub mavtype: MavDistanceSensor,
10575    #[doc = "Onboard ID of the sensor"]
10576    pub id: u8,
10577    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
10578    pub orientation: MavSensorOrientation,
10579    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
10580    pub covariance: u8,
10581    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10582    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10583    pub horizontal_fov: f32,
10584    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10585    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10586    pub vertical_fov: f32,
10587    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
10588    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10589    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10590    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10591    pub quaternion: [f32; 4],
10592    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
10593    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10594    pub signal_quality: u8,
10595}
10596impl DISTANCE_SENSOR_DATA {
10597    pub const ENCODED_LEN: usize = 39usize;
10598    pub const DEFAULT: Self = Self {
10599        time_boot_ms: 0_u32,
10600        min_distance: 0_u16,
10601        max_distance: 0_u16,
10602        current_distance: 0_u16,
10603        mavtype: MavDistanceSensor::DEFAULT,
10604        id: 0_u8,
10605        orientation: MavSensorOrientation::DEFAULT,
10606        covariance: 0_u8,
10607        horizontal_fov: 0.0_f32,
10608        vertical_fov: 0.0_f32,
10609        quaternion: [0.0_f32; 4usize],
10610        signal_quality: 0_u8,
10611    };
10612    #[cfg(feature = "arbitrary")]
10613    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10614        use arbitrary::{Arbitrary, Unstructured};
10615        let mut buf = [0u8; 1024];
10616        rng.fill_bytes(&mut buf);
10617        let mut unstructured = Unstructured::new(&buf);
10618        Self::arbitrary(&mut unstructured).unwrap_or_default()
10619    }
10620}
10621impl Default for DISTANCE_SENSOR_DATA {
10622    fn default() -> Self {
10623        Self::DEFAULT.clone()
10624    }
10625}
10626impl MessageData for DISTANCE_SENSOR_DATA {
10627    type Message = MavMessage;
10628    const ID: u32 = 132u32;
10629    const NAME: &'static str = "DISTANCE_SENSOR";
10630    const EXTRA_CRC: u8 = 85u8;
10631    const ENCODED_LEN: usize = 39usize;
10632    fn deser(
10633        _version: MavlinkVersion,
10634        __input: &[u8],
10635    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10636        let avail_len = __input.len();
10637        let mut payload_buf = [0; Self::ENCODED_LEN];
10638        let mut buf = if avail_len < Self::ENCODED_LEN {
10639            payload_buf[0..avail_len].copy_from_slice(__input);
10640            Bytes::new(&payload_buf)
10641        } else {
10642            Bytes::new(__input)
10643        };
10644        let mut __struct = Self::default();
10645        __struct.time_boot_ms = buf.get_u32_le()?;
10646        __struct.min_distance = buf.get_u16_le()?;
10647        __struct.max_distance = buf.get_u16_le()?;
10648        __struct.current_distance = buf.get_u16_le()?;
10649        let tmp = buf.get_u8()?;
10650        __struct.mavtype =
10651            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10652                enum_type: "MavDistanceSensor",
10653                value: tmp as u64,
10654            })?;
10655        __struct.id = buf.get_u8()?;
10656        let tmp = buf.get_u8()?;
10657        __struct.orientation =
10658            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10659                enum_type: "MavSensorOrientation",
10660                value: tmp as u64,
10661            })?;
10662        __struct.covariance = buf.get_u8()?;
10663        __struct.horizontal_fov = buf.get_f32_le()?;
10664        __struct.vertical_fov = buf.get_f32_le()?;
10665        for v in &mut __struct.quaternion {
10666            let val = buf.get_f32_le()?;
10667            *v = val;
10668        }
10669        __struct.signal_quality = buf.get_u8()?;
10670        Ok(__struct)
10671    }
10672    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10673        let mut __tmp = BytesMut::new(bytes);
10674        #[allow(clippy::absurd_extreme_comparisons)]
10675        #[allow(unused_comparisons)]
10676        if __tmp.remaining() < Self::ENCODED_LEN {
10677            panic!(
10678                "buffer is too small (need {} bytes, but got {})",
10679                Self::ENCODED_LEN,
10680                __tmp.remaining(),
10681            )
10682        }
10683        __tmp.put_u32_le(self.time_boot_ms);
10684        __tmp.put_u16_le(self.min_distance);
10685        __tmp.put_u16_le(self.max_distance);
10686        __tmp.put_u16_le(self.current_distance);
10687        __tmp.put_u8(self.mavtype as u8);
10688        __tmp.put_u8(self.id);
10689        __tmp.put_u8(self.orientation as u8);
10690        __tmp.put_u8(self.covariance);
10691        if matches!(version, MavlinkVersion::V2) {
10692            __tmp.put_f32_le(self.horizontal_fov);
10693            __tmp.put_f32_le(self.vertical_fov);
10694            for val in &self.quaternion {
10695                __tmp.put_f32_le(*val);
10696            }
10697            __tmp.put_u8(self.signal_quality);
10698            let len = __tmp.len();
10699            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10700        } else {
10701            __tmp.len()
10702        }
10703    }
10704}
10705#[doc = "EFI status output."]
10706#[doc = ""]
10707#[doc = "ID: 225"]
10708#[derive(Debug, Clone, PartialEq)]
10709#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10710#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10711#[cfg_attr(feature = "ts", derive(TS))]
10712#[cfg_attr(feature = "ts", ts(export))]
10713pub struct EFI_STATUS_DATA {
10714    #[doc = "ECU index"]
10715    pub ecu_index: f32,
10716    #[doc = "RPM"]
10717    pub rpm: f32,
10718    #[doc = "Fuel consumed"]
10719    pub fuel_consumed: f32,
10720    #[doc = "Fuel flow rate"]
10721    pub fuel_flow: f32,
10722    #[doc = "Engine load"]
10723    pub engine_load: f32,
10724    #[doc = "Throttle position"]
10725    pub throttle_position: f32,
10726    #[doc = "Spark dwell time"]
10727    pub spark_dwell_time: f32,
10728    #[doc = "Barometric pressure"]
10729    pub barometric_pressure: f32,
10730    #[doc = "Intake manifold pressure("]
10731    pub intake_manifold_pressure: f32,
10732    #[doc = "Intake manifold temperature"]
10733    pub intake_manifold_temperature: f32,
10734    #[doc = "Cylinder head temperature"]
10735    pub cylinder_head_temperature: f32,
10736    #[doc = "Ignition timing (Crank angle degrees)"]
10737    pub ignition_timing: f32,
10738    #[doc = "Injection time"]
10739    pub injection_time: f32,
10740    #[doc = "Exhaust gas temperature"]
10741    pub exhaust_gas_temperature: f32,
10742    #[doc = "Output throttle"]
10743    pub throttle_out: f32,
10744    #[doc = "Pressure/temperature compensation"]
10745    pub pt_compensation: f32,
10746    #[doc = "EFI health status"]
10747    pub health: u8,
10748    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
10749    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10750    pub ignition_voltage: f32,
10751    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
10752    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10753    pub fuel_pressure: f32,
10754}
10755impl EFI_STATUS_DATA {
10756    pub const ENCODED_LEN: usize = 73usize;
10757    pub const DEFAULT: Self = Self {
10758        ecu_index: 0.0_f32,
10759        rpm: 0.0_f32,
10760        fuel_consumed: 0.0_f32,
10761        fuel_flow: 0.0_f32,
10762        engine_load: 0.0_f32,
10763        throttle_position: 0.0_f32,
10764        spark_dwell_time: 0.0_f32,
10765        barometric_pressure: 0.0_f32,
10766        intake_manifold_pressure: 0.0_f32,
10767        intake_manifold_temperature: 0.0_f32,
10768        cylinder_head_temperature: 0.0_f32,
10769        ignition_timing: 0.0_f32,
10770        injection_time: 0.0_f32,
10771        exhaust_gas_temperature: 0.0_f32,
10772        throttle_out: 0.0_f32,
10773        pt_compensation: 0.0_f32,
10774        health: 0_u8,
10775        ignition_voltage: 0.0_f32,
10776        fuel_pressure: 0.0_f32,
10777    };
10778    #[cfg(feature = "arbitrary")]
10779    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10780        use arbitrary::{Arbitrary, Unstructured};
10781        let mut buf = [0u8; 1024];
10782        rng.fill_bytes(&mut buf);
10783        let mut unstructured = Unstructured::new(&buf);
10784        Self::arbitrary(&mut unstructured).unwrap_or_default()
10785    }
10786}
10787impl Default for EFI_STATUS_DATA {
10788    fn default() -> Self {
10789        Self::DEFAULT.clone()
10790    }
10791}
10792impl MessageData for EFI_STATUS_DATA {
10793    type Message = MavMessage;
10794    const ID: u32 = 225u32;
10795    const NAME: &'static str = "EFI_STATUS";
10796    const EXTRA_CRC: u8 = 208u8;
10797    const ENCODED_LEN: usize = 73usize;
10798    fn deser(
10799        _version: MavlinkVersion,
10800        __input: &[u8],
10801    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10802        let avail_len = __input.len();
10803        let mut payload_buf = [0; Self::ENCODED_LEN];
10804        let mut buf = if avail_len < Self::ENCODED_LEN {
10805            payload_buf[0..avail_len].copy_from_slice(__input);
10806            Bytes::new(&payload_buf)
10807        } else {
10808            Bytes::new(__input)
10809        };
10810        let mut __struct = Self::default();
10811        __struct.ecu_index = buf.get_f32_le()?;
10812        __struct.rpm = buf.get_f32_le()?;
10813        __struct.fuel_consumed = buf.get_f32_le()?;
10814        __struct.fuel_flow = buf.get_f32_le()?;
10815        __struct.engine_load = buf.get_f32_le()?;
10816        __struct.throttle_position = buf.get_f32_le()?;
10817        __struct.spark_dwell_time = buf.get_f32_le()?;
10818        __struct.barometric_pressure = buf.get_f32_le()?;
10819        __struct.intake_manifold_pressure = buf.get_f32_le()?;
10820        __struct.intake_manifold_temperature = buf.get_f32_le()?;
10821        __struct.cylinder_head_temperature = buf.get_f32_le()?;
10822        __struct.ignition_timing = buf.get_f32_le()?;
10823        __struct.injection_time = buf.get_f32_le()?;
10824        __struct.exhaust_gas_temperature = buf.get_f32_le()?;
10825        __struct.throttle_out = buf.get_f32_le()?;
10826        __struct.pt_compensation = buf.get_f32_le()?;
10827        __struct.health = buf.get_u8()?;
10828        __struct.ignition_voltage = buf.get_f32_le()?;
10829        __struct.fuel_pressure = buf.get_f32_le()?;
10830        Ok(__struct)
10831    }
10832    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10833        let mut __tmp = BytesMut::new(bytes);
10834        #[allow(clippy::absurd_extreme_comparisons)]
10835        #[allow(unused_comparisons)]
10836        if __tmp.remaining() < Self::ENCODED_LEN {
10837            panic!(
10838                "buffer is too small (need {} bytes, but got {})",
10839                Self::ENCODED_LEN,
10840                __tmp.remaining(),
10841            )
10842        }
10843        __tmp.put_f32_le(self.ecu_index);
10844        __tmp.put_f32_le(self.rpm);
10845        __tmp.put_f32_le(self.fuel_consumed);
10846        __tmp.put_f32_le(self.fuel_flow);
10847        __tmp.put_f32_le(self.engine_load);
10848        __tmp.put_f32_le(self.throttle_position);
10849        __tmp.put_f32_le(self.spark_dwell_time);
10850        __tmp.put_f32_le(self.barometric_pressure);
10851        __tmp.put_f32_le(self.intake_manifold_pressure);
10852        __tmp.put_f32_le(self.intake_manifold_temperature);
10853        __tmp.put_f32_le(self.cylinder_head_temperature);
10854        __tmp.put_f32_le(self.ignition_timing);
10855        __tmp.put_f32_le(self.injection_time);
10856        __tmp.put_f32_le(self.exhaust_gas_temperature);
10857        __tmp.put_f32_le(self.throttle_out);
10858        __tmp.put_f32_le(self.pt_compensation);
10859        __tmp.put_u8(self.health);
10860        if matches!(version, MavlinkVersion::V2) {
10861            __tmp.put_f32_le(self.ignition_voltage);
10862            __tmp.put_f32_le(self.fuel_pressure);
10863            let len = __tmp.len();
10864            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10865        } else {
10866            __tmp.len()
10867        }
10868    }
10869}
10870#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10871#[doc = ""]
10872#[doc = "ID: 131"]
10873#[derive(Debug, Clone, PartialEq)]
10874#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10875#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10876#[cfg_attr(feature = "ts", derive(TS))]
10877#[cfg_attr(feature = "ts", ts(export))]
10878pub struct ENCAPSULATED_DATA_DATA {
10879    #[doc = "sequence number (starting with 0 on every transmission)"]
10880    pub seqnr: u16,
10881    #[doc = "image data bytes"]
10882    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10883    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10884    pub data: [u8; 253],
10885}
10886impl ENCAPSULATED_DATA_DATA {
10887    pub const ENCODED_LEN: usize = 255usize;
10888    pub const DEFAULT: Self = Self {
10889        seqnr: 0_u16,
10890        data: [0_u8; 253usize],
10891    };
10892    #[cfg(feature = "arbitrary")]
10893    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10894        use arbitrary::{Arbitrary, Unstructured};
10895        let mut buf = [0u8; 1024];
10896        rng.fill_bytes(&mut buf);
10897        let mut unstructured = Unstructured::new(&buf);
10898        Self::arbitrary(&mut unstructured).unwrap_or_default()
10899    }
10900}
10901impl Default for ENCAPSULATED_DATA_DATA {
10902    fn default() -> Self {
10903        Self::DEFAULT.clone()
10904    }
10905}
10906impl MessageData for ENCAPSULATED_DATA_DATA {
10907    type Message = MavMessage;
10908    const ID: u32 = 131u32;
10909    const NAME: &'static str = "ENCAPSULATED_DATA";
10910    const EXTRA_CRC: u8 = 223u8;
10911    const ENCODED_LEN: usize = 255usize;
10912    fn deser(
10913        _version: MavlinkVersion,
10914        __input: &[u8],
10915    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10916        let avail_len = __input.len();
10917        let mut payload_buf = [0; Self::ENCODED_LEN];
10918        let mut buf = if avail_len < Self::ENCODED_LEN {
10919            payload_buf[0..avail_len].copy_from_slice(__input);
10920            Bytes::new(&payload_buf)
10921        } else {
10922            Bytes::new(__input)
10923        };
10924        let mut __struct = Self::default();
10925        __struct.seqnr = buf.get_u16_le()?;
10926        for v in &mut __struct.data {
10927            let val = buf.get_u8()?;
10928            *v = val;
10929        }
10930        Ok(__struct)
10931    }
10932    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10933        let mut __tmp = BytesMut::new(bytes);
10934        #[allow(clippy::absurd_extreme_comparisons)]
10935        #[allow(unused_comparisons)]
10936        if __tmp.remaining() < Self::ENCODED_LEN {
10937            panic!(
10938                "buffer is too small (need {} bytes, but got {})",
10939                Self::ENCODED_LEN,
10940                __tmp.remaining(),
10941            )
10942        }
10943        __tmp.put_u16_le(self.seqnr);
10944        for val in &self.data {
10945            __tmp.put_u8(*val);
10946        }
10947        if matches!(version, MavlinkVersion::V2) {
10948            let len = __tmp.len();
10949            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10950        } else {
10951            __tmp.len()
10952        }
10953    }
10954}
10955#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
10956#[doc = ""]
10957#[doc = "ID: 290"]
10958#[derive(Debug, Clone, PartialEq)]
10959#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10960#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10961#[cfg_attr(feature = "ts", derive(TS))]
10962#[cfg_attr(feature = "ts", ts(export))]
10963pub struct ESC_INFO_DATA {
10964    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
10965    pub time_usec: u64,
10966    #[doc = "Number of reported errors by each ESC since boot."]
10967    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10968    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10969    pub error_count: [u32; 4],
10970    #[doc = "Counter of data packets received."]
10971    pub counter: u16,
10972    #[doc = "Bitmap of ESC failure flags."]
10973    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10974    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10975    pub failure_flags: [u16; 4],
10976    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
10977    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10978    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10979    pub temperature: [i16; 4],
10980    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
10981    pub index: u8,
10982    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
10983    pub count: u8,
10984    #[doc = "Connection type protocol for all ESC."]
10985    pub connection_type: EscConnectionType,
10986    #[doc = "Information regarding online/offline status of each ESC."]
10987    pub info: u8,
10988}
10989impl ESC_INFO_DATA {
10990    pub const ENCODED_LEN: usize = 46usize;
10991    pub const DEFAULT: Self = Self {
10992        time_usec: 0_u64,
10993        error_count: [0_u32; 4usize],
10994        counter: 0_u16,
10995        failure_flags: [0_u16; 4usize],
10996        temperature: [0_i16; 4usize],
10997        index: 0_u8,
10998        count: 0_u8,
10999        connection_type: EscConnectionType::DEFAULT,
11000        info: 0_u8,
11001    };
11002    #[cfg(feature = "arbitrary")]
11003    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11004        use arbitrary::{Arbitrary, Unstructured};
11005        let mut buf = [0u8; 1024];
11006        rng.fill_bytes(&mut buf);
11007        let mut unstructured = Unstructured::new(&buf);
11008        Self::arbitrary(&mut unstructured).unwrap_or_default()
11009    }
11010}
11011impl Default for ESC_INFO_DATA {
11012    fn default() -> Self {
11013        Self::DEFAULT.clone()
11014    }
11015}
11016impl MessageData for ESC_INFO_DATA {
11017    type Message = MavMessage;
11018    const ID: u32 = 290u32;
11019    const NAME: &'static str = "ESC_INFO";
11020    const EXTRA_CRC: u8 = 251u8;
11021    const ENCODED_LEN: usize = 46usize;
11022    fn deser(
11023        _version: MavlinkVersion,
11024        __input: &[u8],
11025    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11026        let avail_len = __input.len();
11027        let mut payload_buf = [0; Self::ENCODED_LEN];
11028        let mut buf = if avail_len < Self::ENCODED_LEN {
11029            payload_buf[0..avail_len].copy_from_slice(__input);
11030            Bytes::new(&payload_buf)
11031        } else {
11032            Bytes::new(__input)
11033        };
11034        let mut __struct = Self::default();
11035        __struct.time_usec = buf.get_u64_le()?;
11036        for v in &mut __struct.error_count {
11037            let val = buf.get_u32_le()?;
11038            *v = val;
11039        }
11040        __struct.counter = buf.get_u16_le()?;
11041        for v in &mut __struct.failure_flags {
11042            let val = buf.get_u16_le()?;
11043            *v = val;
11044        }
11045        for v in &mut __struct.temperature {
11046            let val = buf.get_i16_le()?;
11047            *v = val;
11048        }
11049        __struct.index = buf.get_u8()?;
11050        __struct.count = buf.get_u8()?;
11051        let tmp = buf.get_u8()?;
11052        __struct.connection_type =
11053            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11054                enum_type: "EscConnectionType",
11055                value: tmp as u64,
11056            })?;
11057        __struct.info = buf.get_u8()?;
11058        Ok(__struct)
11059    }
11060    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11061        let mut __tmp = BytesMut::new(bytes);
11062        #[allow(clippy::absurd_extreme_comparisons)]
11063        #[allow(unused_comparisons)]
11064        if __tmp.remaining() < Self::ENCODED_LEN {
11065            panic!(
11066                "buffer is too small (need {} bytes, but got {})",
11067                Self::ENCODED_LEN,
11068                __tmp.remaining(),
11069            )
11070        }
11071        __tmp.put_u64_le(self.time_usec);
11072        for val in &self.error_count {
11073            __tmp.put_u32_le(*val);
11074        }
11075        __tmp.put_u16_le(self.counter);
11076        for val in &self.failure_flags {
11077            __tmp.put_u16_le(*val);
11078        }
11079        for val in &self.temperature {
11080            __tmp.put_i16_le(*val);
11081        }
11082        __tmp.put_u8(self.index);
11083        __tmp.put_u8(self.count);
11084        __tmp.put_u8(self.connection_type as u8);
11085        __tmp.put_u8(self.info);
11086        if matches!(version, MavlinkVersion::V2) {
11087            let len = __tmp.len();
11088            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11089        } else {
11090            __tmp.len()
11091        }
11092    }
11093}
11094#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11095#[doc = ""]
11096#[doc = "ID: 291"]
11097#[derive(Debug, Clone, PartialEq)]
11098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11100#[cfg_attr(feature = "ts", derive(TS))]
11101#[cfg_attr(feature = "ts", ts(export))]
11102pub struct ESC_STATUS_DATA {
11103    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11104    pub time_usec: u64,
11105    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11106    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11107    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11108    pub rpm: [i32; 4],
11109    #[doc = "Voltage measured from each ESC."]
11110    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11111    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11112    pub voltage: [f32; 4],
11113    #[doc = "Current measured from each ESC."]
11114    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11115    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11116    pub current: [f32; 4],
11117    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11118    pub index: u8,
11119}
11120impl ESC_STATUS_DATA {
11121    pub const ENCODED_LEN: usize = 57usize;
11122    pub const DEFAULT: Self = Self {
11123        time_usec: 0_u64,
11124        rpm: [0_i32; 4usize],
11125        voltage: [0.0_f32; 4usize],
11126        current: [0.0_f32; 4usize],
11127        index: 0_u8,
11128    };
11129    #[cfg(feature = "arbitrary")]
11130    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11131        use arbitrary::{Arbitrary, Unstructured};
11132        let mut buf = [0u8; 1024];
11133        rng.fill_bytes(&mut buf);
11134        let mut unstructured = Unstructured::new(&buf);
11135        Self::arbitrary(&mut unstructured).unwrap_or_default()
11136    }
11137}
11138impl Default for ESC_STATUS_DATA {
11139    fn default() -> Self {
11140        Self::DEFAULT.clone()
11141    }
11142}
11143impl MessageData for ESC_STATUS_DATA {
11144    type Message = MavMessage;
11145    const ID: u32 = 291u32;
11146    const NAME: &'static str = "ESC_STATUS";
11147    const EXTRA_CRC: u8 = 10u8;
11148    const ENCODED_LEN: usize = 57usize;
11149    fn deser(
11150        _version: MavlinkVersion,
11151        __input: &[u8],
11152    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11153        let avail_len = __input.len();
11154        let mut payload_buf = [0; Self::ENCODED_LEN];
11155        let mut buf = if avail_len < Self::ENCODED_LEN {
11156            payload_buf[0..avail_len].copy_from_slice(__input);
11157            Bytes::new(&payload_buf)
11158        } else {
11159            Bytes::new(__input)
11160        };
11161        let mut __struct = Self::default();
11162        __struct.time_usec = buf.get_u64_le()?;
11163        for v in &mut __struct.rpm {
11164            let val = buf.get_i32_le()?;
11165            *v = val;
11166        }
11167        for v in &mut __struct.voltage {
11168            let val = buf.get_f32_le()?;
11169            *v = val;
11170        }
11171        for v in &mut __struct.current {
11172            let val = buf.get_f32_le()?;
11173            *v = val;
11174        }
11175        __struct.index = buf.get_u8()?;
11176        Ok(__struct)
11177    }
11178    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11179        let mut __tmp = BytesMut::new(bytes);
11180        #[allow(clippy::absurd_extreme_comparisons)]
11181        #[allow(unused_comparisons)]
11182        if __tmp.remaining() < Self::ENCODED_LEN {
11183            panic!(
11184                "buffer is too small (need {} bytes, but got {})",
11185                Self::ENCODED_LEN,
11186                __tmp.remaining(),
11187            )
11188        }
11189        __tmp.put_u64_le(self.time_usec);
11190        for val in &self.rpm {
11191            __tmp.put_i32_le(*val);
11192        }
11193        for val in &self.voltage {
11194            __tmp.put_f32_le(*val);
11195        }
11196        for val in &self.current {
11197            __tmp.put_f32_le(*val);
11198        }
11199        __tmp.put_u8(self.index);
11200        if matches!(version, MavlinkVersion::V2) {
11201            let len = __tmp.len();
11202            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11203        } else {
11204            __tmp.len()
11205        }
11206    }
11207}
11208#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11209#[doc = ""]
11210#[doc = "ID: 230"]
11211#[derive(Debug, Clone, PartialEq)]
11212#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11213#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11214#[cfg_attr(feature = "ts", derive(TS))]
11215#[cfg_attr(feature = "ts", ts(export))]
11216pub struct ESTIMATOR_STATUS_DATA {
11217    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11218    pub time_usec: u64,
11219    #[doc = "Velocity innovation test ratio"]
11220    pub vel_ratio: f32,
11221    #[doc = "Horizontal position innovation test ratio"]
11222    pub pos_horiz_ratio: f32,
11223    #[doc = "Vertical position innovation test ratio"]
11224    pub pos_vert_ratio: f32,
11225    #[doc = "Magnetometer innovation test ratio"]
11226    pub mag_ratio: f32,
11227    #[doc = "Height above terrain innovation test ratio"]
11228    pub hagl_ratio: f32,
11229    #[doc = "True airspeed innovation test ratio"]
11230    pub tas_ratio: f32,
11231    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11232    pub pos_horiz_accuracy: f32,
11233    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11234    pub pos_vert_accuracy: f32,
11235    #[doc = "Bitmap indicating which EKF outputs are valid."]
11236    pub flags: EstimatorStatusFlags,
11237}
11238impl ESTIMATOR_STATUS_DATA {
11239    pub const ENCODED_LEN: usize = 42usize;
11240    pub const DEFAULT: Self = Self {
11241        time_usec: 0_u64,
11242        vel_ratio: 0.0_f32,
11243        pos_horiz_ratio: 0.0_f32,
11244        pos_vert_ratio: 0.0_f32,
11245        mag_ratio: 0.0_f32,
11246        hagl_ratio: 0.0_f32,
11247        tas_ratio: 0.0_f32,
11248        pos_horiz_accuracy: 0.0_f32,
11249        pos_vert_accuracy: 0.0_f32,
11250        flags: EstimatorStatusFlags::DEFAULT,
11251    };
11252    #[cfg(feature = "arbitrary")]
11253    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11254        use arbitrary::{Arbitrary, Unstructured};
11255        let mut buf = [0u8; 1024];
11256        rng.fill_bytes(&mut buf);
11257        let mut unstructured = Unstructured::new(&buf);
11258        Self::arbitrary(&mut unstructured).unwrap_or_default()
11259    }
11260}
11261impl Default for ESTIMATOR_STATUS_DATA {
11262    fn default() -> Self {
11263        Self::DEFAULT.clone()
11264    }
11265}
11266impl MessageData for ESTIMATOR_STATUS_DATA {
11267    type Message = MavMessage;
11268    const ID: u32 = 230u32;
11269    const NAME: &'static str = "ESTIMATOR_STATUS";
11270    const EXTRA_CRC: u8 = 163u8;
11271    const ENCODED_LEN: usize = 42usize;
11272    fn deser(
11273        _version: MavlinkVersion,
11274        __input: &[u8],
11275    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11276        let avail_len = __input.len();
11277        let mut payload_buf = [0; Self::ENCODED_LEN];
11278        let mut buf = if avail_len < Self::ENCODED_LEN {
11279            payload_buf[0..avail_len].copy_from_slice(__input);
11280            Bytes::new(&payload_buf)
11281        } else {
11282            Bytes::new(__input)
11283        };
11284        let mut __struct = Self::default();
11285        __struct.time_usec = buf.get_u64_le()?;
11286        __struct.vel_ratio = buf.get_f32_le()?;
11287        __struct.pos_horiz_ratio = buf.get_f32_le()?;
11288        __struct.pos_vert_ratio = buf.get_f32_le()?;
11289        __struct.mag_ratio = buf.get_f32_le()?;
11290        __struct.hagl_ratio = buf.get_f32_le()?;
11291        __struct.tas_ratio = buf.get_f32_le()?;
11292        __struct.pos_horiz_accuracy = buf.get_f32_le()?;
11293        __struct.pos_vert_accuracy = buf.get_f32_le()?;
11294        let tmp = buf.get_u16_le()?;
11295        __struct.flags = EstimatorStatusFlags::from_bits(
11296            tmp as <EstimatorStatusFlags as Flags>::Bits,
11297        )
11298        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11299            flag_type: "EstimatorStatusFlags",
11300            value: tmp as u64,
11301        })?;
11302        Ok(__struct)
11303    }
11304    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11305        let mut __tmp = BytesMut::new(bytes);
11306        #[allow(clippy::absurd_extreme_comparisons)]
11307        #[allow(unused_comparisons)]
11308        if __tmp.remaining() < Self::ENCODED_LEN {
11309            panic!(
11310                "buffer is too small (need {} bytes, but got {})",
11311                Self::ENCODED_LEN,
11312                __tmp.remaining(),
11313            )
11314        }
11315        __tmp.put_u64_le(self.time_usec);
11316        __tmp.put_f32_le(self.vel_ratio);
11317        __tmp.put_f32_le(self.pos_horiz_ratio);
11318        __tmp.put_f32_le(self.pos_vert_ratio);
11319        __tmp.put_f32_le(self.mag_ratio);
11320        __tmp.put_f32_le(self.hagl_ratio);
11321        __tmp.put_f32_le(self.tas_ratio);
11322        __tmp.put_f32_le(self.pos_horiz_accuracy);
11323        __tmp.put_f32_le(self.pos_vert_accuracy);
11324        __tmp.put_u16_le(self.flags.bits() as u16);
11325        if matches!(version, MavlinkVersion::V2) {
11326            let len = __tmp.len();
11327            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11328        } else {
11329            __tmp.len()
11330        }
11331    }
11332}
11333#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11334#[doc = ""]
11335#[doc = "ID: 410"]
11336#[derive(Debug, Clone, PartialEq)]
11337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11338#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11339#[cfg_attr(feature = "ts", derive(TS))]
11340#[cfg_attr(feature = "ts", ts(export))]
11341pub struct EVENT_DATA {
11342    #[doc = "Event ID (as defined in the component metadata)"]
11343    pub id: u32,
11344    #[doc = "Timestamp (time since system boot when the event happened)."]
11345    pub event_time_boot_ms: u32,
11346    #[doc = "Sequence number."]
11347    pub sequence: u16,
11348    #[doc = "Component ID"]
11349    pub destination_component: u8,
11350    #[doc = "System ID"]
11351    pub destination_system: u8,
11352    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11353    pub log_levels: u8,
11354    #[doc = "Arguments (depend on event ID)."]
11355    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11356    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11357    pub arguments: [u8; 40],
11358}
11359impl EVENT_DATA {
11360    pub const ENCODED_LEN: usize = 53usize;
11361    pub const DEFAULT: Self = Self {
11362        id: 0_u32,
11363        event_time_boot_ms: 0_u32,
11364        sequence: 0_u16,
11365        destination_component: 0_u8,
11366        destination_system: 0_u8,
11367        log_levels: 0_u8,
11368        arguments: [0_u8; 40usize],
11369    };
11370    #[cfg(feature = "arbitrary")]
11371    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11372        use arbitrary::{Arbitrary, Unstructured};
11373        let mut buf = [0u8; 1024];
11374        rng.fill_bytes(&mut buf);
11375        let mut unstructured = Unstructured::new(&buf);
11376        Self::arbitrary(&mut unstructured).unwrap_or_default()
11377    }
11378}
11379impl Default for EVENT_DATA {
11380    fn default() -> Self {
11381        Self::DEFAULT.clone()
11382    }
11383}
11384impl MessageData for EVENT_DATA {
11385    type Message = MavMessage;
11386    const ID: u32 = 410u32;
11387    const NAME: &'static str = "EVENT";
11388    const EXTRA_CRC: u8 = 160u8;
11389    const ENCODED_LEN: usize = 53usize;
11390    fn deser(
11391        _version: MavlinkVersion,
11392        __input: &[u8],
11393    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11394        let avail_len = __input.len();
11395        let mut payload_buf = [0; Self::ENCODED_LEN];
11396        let mut buf = if avail_len < Self::ENCODED_LEN {
11397            payload_buf[0..avail_len].copy_from_slice(__input);
11398            Bytes::new(&payload_buf)
11399        } else {
11400            Bytes::new(__input)
11401        };
11402        let mut __struct = Self::default();
11403        __struct.id = buf.get_u32_le()?;
11404        __struct.event_time_boot_ms = buf.get_u32_le()?;
11405        __struct.sequence = buf.get_u16_le()?;
11406        __struct.destination_component = buf.get_u8()?;
11407        __struct.destination_system = buf.get_u8()?;
11408        __struct.log_levels = buf.get_u8()?;
11409        for v in &mut __struct.arguments {
11410            let val = buf.get_u8()?;
11411            *v = val;
11412        }
11413        Ok(__struct)
11414    }
11415    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11416        let mut __tmp = BytesMut::new(bytes);
11417        #[allow(clippy::absurd_extreme_comparisons)]
11418        #[allow(unused_comparisons)]
11419        if __tmp.remaining() < Self::ENCODED_LEN {
11420            panic!(
11421                "buffer is too small (need {} bytes, but got {})",
11422                Self::ENCODED_LEN,
11423                __tmp.remaining(),
11424            )
11425        }
11426        __tmp.put_u32_le(self.id);
11427        __tmp.put_u32_le(self.event_time_boot_ms);
11428        __tmp.put_u16_le(self.sequence);
11429        __tmp.put_u8(self.destination_component);
11430        __tmp.put_u8(self.destination_system);
11431        __tmp.put_u8(self.log_levels);
11432        for val in &self.arguments {
11433            __tmp.put_u8(*val);
11434        }
11435        if matches!(version, MavlinkVersion::V2) {
11436            let len = __tmp.len();
11437            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11438        } else {
11439            __tmp.len()
11440        }
11441    }
11442}
11443#[doc = "Provides state for additional features."]
11444#[doc = ""]
11445#[doc = "ID: 245"]
11446#[derive(Debug, Clone, PartialEq)]
11447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11448#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11449#[cfg_attr(feature = "ts", derive(TS))]
11450#[cfg_attr(feature = "ts", ts(export))]
11451pub struct EXTENDED_SYS_STATE_DATA {
11452    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11453    pub vtol_state: MavVtolState,
11454    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11455    pub landed_state: MavLandedState,
11456}
11457impl EXTENDED_SYS_STATE_DATA {
11458    pub const ENCODED_LEN: usize = 2usize;
11459    pub const DEFAULT: Self = Self {
11460        vtol_state: MavVtolState::DEFAULT,
11461        landed_state: MavLandedState::DEFAULT,
11462    };
11463    #[cfg(feature = "arbitrary")]
11464    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11465        use arbitrary::{Arbitrary, Unstructured};
11466        let mut buf = [0u8; 1024];
11467        rng.fill_bytes(&mut buf);
11468        let mut unstructured = Unstructured::new(&buf);
11469        Self::arbitrary(&mut unstructured).unwrap_or_default()
11470    }
11471}
11472impl Default for EXTENDED_SYS_STATE_DATA {
11473    fn default() -> Self {
11474        Self::DEFAULT.clone()
11475    }
11476}
11477impl MessageData for EXTENDED_SYS_STATE_DATA {
11478    type Message = MavMessage;
11479    const ID: u32 = 245u32;
11480    const NAME: &'static str = "EXTENDED_SYS_STATE";
11481    const EXTRA_CRC: u8 = 130u8;
11482    const ENCODED_LEN: usize = 2usize;
11483    fn deser(
11484        _version: MavlinkVersion,
11485        __input: &[u8],
11486    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11487        let avail_len = __input.len();
11488        let mut payload_buf = [0; Self::ENCODED_LEN];
11489        let mut buf = if avail_len < Self::ENCODED_LEN {
11490            payload_buf[0..avail_len].copy_from_slice(__input);
11491            Bytes::new(&payload_buf)
11492        } else {
11493            Bytes::new(__input)
11494        };
11495        let mut __struct = Self::default();
11496        let tmp = buf.get_u8()?;
11497        __struct.vtol_state =
11498            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11499                enum_type: "MavVtolState",
11500                value: tmp as u64,
11501            })?;
11502        let tmp = buf.get_u8()?;
11503        __struct.landed_state =
11504            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11505                enum_type: "MavLandedState",
11506                value: tmp as u64,
11507            })?;
11508        Ok(__struct)
11509    }
11510    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11511        let mut __tmp = BytesMut::new(bytes);
11512        #[allow(clippy::absurd_extreme_comparisons)]
11513        #[allow(unused_comparisons)]
11514        if __tmp.remaining() < Self::ENCODED_LEN {
11515            panic!(
11516                "buffer is too small (need {} bytes, but got {})",
11517                Self::ENCODED_LEN,
11518                __tmp.remaining(),
11519            )
11520        }
11521        __tmp.put_u8(self.vtol_state as u8);
11522        __tmp.put_u8(self.landed_state as u8);
11523        if matches!(version, MavlinkVersion::V2) {
11524            let len = __tmp.len();
11525            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11526        } else {
11527            __tmp.len()
11528        }
11529    }
11530}
11531#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
11532#[doc = ""]
11533#[doc = "ID: 162"]
11534#[derive(Debug, Clone, PartialEq)]
11535#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11536#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11537#[cfg_attr(feature = "ts", derive(TS))]
11538#[cfg_attr(feature = "ts", ts(export))]
11539pub struct FENCE_STATUS_DATA {
11540    #[doc = "Time (since boot) of last breach."]
11541    pub breach_time: u32,
11542    #[doc = "Number of fence breaches."]
11543    pub breach_count: u16,
11544    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
11545    pub breach_status: u8,
11546    #[doc = "Last breach type."]
11547    pub breach_type: FenceBreach,
11548    #[doc = "Active action to prevent fence breach"]
11549    #[cfg_attr(feature = "serde", serde(default))]
11550    pub breach_mitigation: FenceMitigate,
11551}
11552impl FENCE_STATUS_DATA {
11553    pub const ENCODED_LEN: usize = 9usize;
11554    pub const DEFAULT: Self = Self {
11555        breach_time: 0_u32,
11556        breach_count: 0_u16,
11557        breach_status: 0_u8,
11558        breach_type: FenceBreach::DEFAULT,
11559        breach_mitigation: FenceMitigate::DEFAULT,
11560    };
11561    #[cfg(feature = "arbitrary")]
11562    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11563        use arbitrary::{Arbitrary, Unstructured};
11564        let mut buf = [0u8; 1024];
11565        rng.fill_bytes(&mut buf);
11566        let mut unstructured = Unstructured::new(&buf);
11567        Self::arbitrary(&mut unstructured).unwrap_or_default()
11568    }
11569}
11570impl Default for FENCE_STATUS_DATA {
11571    fn default() -> Self {
11572        Self::DEFAULT.clone()
11573    }
11574}
11575impl MessageData for FENCE_STATUS_DATA {
11576    type Message = MavMessage;
11577    const ID: u32 = 162u32;
11578    const NAME: &'static str = "FENCE_STATUS";
11579    const EXTRA_CRC: u8 = 189u8;
11580    const ENCODED_LEN: usize = 9usize;
11581    fn deser(
11582        _version: MavlinkVersion,
11583        __input: &[u8],
11584    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11585        let avail_len = __input.len();
11586        let mut payload_buf = [0; Self::ENCODED_LEN];
11587        let mut buf = if avail_len < Self::ENCODED_LEN {
11588            payload_buf[0..avail_len].copy_from_slice(__input);
11589            Bytes::new(&payload_buf)
11590        } else {
11591            Bytes::new(__input)
11592        };
11593        let mut __struct = Self::default();
11594        __struct.breach_time = buf.get_u32_le()?;
11595        __struct.breach_count = buf.get_u16_le()?;
11596        __struct.breach_status = buf.get_u8()?;
11597        let tmp = buf.get_u8()?;
11598        __struct.breach_type =
11599            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11600                enum_type: "FenceBreach",
11601                value: tmp as u64,
11602            })?;
11603        let tmp = buf.get_u8()?;
11604        __struct.breach_mitigation =
11605            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11606                enum_type: "FenceMitigate",
11607                value: tmp as u64,
11608            })?;
11609        Ok(__struct)
11610    }
11611    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11612        let mut __tmp = BytesMut::new(bytes);
11613        #[allow(clippy::absurd_extreme_comparisons)]
11614        #[allow(unused_comparisons)]
11615        if __tmp.remaining() < Self::ENCODED_LEN {
11616            panic!(
11617                "buffer is too small (need {} bytes, but got {})",
11618                Self::ENCODED_LEN,
11619                __tmp.remaining(),
11620            )
11621        }
11622        __tmp.put_u32_le(self.breach_time);
11623        __tmp.put_u16_le(self.breach_count);
11624        __tmp.put_u8(self.breach_status);
11625        __tmp.put_u8(self.breach_type as u8);
11626        if matches!(version, MavlinkVersion::V2) {
11627            __tmp.put_u8(self.breach_mitigation as u8);
11628            let len = __tmp.len();
11629            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11630        } else {
11631            __tmp.len()
11632        }
11633    }
11634}
11635#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
11636#[doc = ""]
11637#[doc = "ID: 110"]
11638#[derive(Debug, Clone, PartialEq)]
11639#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11640#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11641#[cfg_attr(feature = "ts", derive(TS))]
11642#[cfg_attr(feature = "ts", ts(export))]
11643pub struct FILE_TRANSFER_PROTOCOL_DATA {
11644    #[doc = "Network ID (0 for broadcast)"]
11645    pub target_network: u8,
11646    #[doc = "System ID (0 for broadcast)"]
11647    pub target_system: u8,
11648    #[doc = "Component ID (0 for broadcast)"]
11649    pub target_component: u8,
11650    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
11651    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11652    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11653    pub payload: [u8; 251],
11654}
11655impl FILE_TRANSFER_PROTOCOL_DATA {
11656    pub const ENCODED_LEN: usize = 254usize;
11657    pub const DEFAULT: Self = Self {
11658        target_network: 0_u8,
11659        target_system: 0_u8,
11660        target_component: 0_u8,
11661        payload: [0_u8; 251usize],
11662    };
11663    #[cfg(feature = "arbitrary")]
11664    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11665        use arbitrary::{Arbitrary, Unstructured};
11666        let mut buf = [0u8; 1024];
11667        rng.fill_bytes(&mut buf);
11668        let mut unstructured = Unstructured::new(&buf);
11669        Self::arbitrary(&mut unstructured).unwrap_or_default()
11670    }
11671}
11672impl Default for FILE_TRANSFER_PROTOCOL_DATA {
11673    fn default() -> Self {
11674        Self::DEFAULT.clone()
11675    }
11676}
11677impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
11678    type Message = MavMessage;
11679    const ID: u32 = 110u32;
11680    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
11681    const EXTRA_CRC: u8 = 84u8;
11682    const ENCODED_LEN: usize = 254usize;
11683    fn deser(
11684        _version: MavlinkVersion,
11685        __input: &[u8],
11686    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11687        let avail_len = __input.len();
11688        let mut payload_buf = [0; Self::ENCODED_LEN];
11689        let mut buf = if avail_len < Self::ENCODED_LEN {
11690            payload_buf[0..avail_len].copy_from_slice(__input);
11691            Bytes::new(&payload_buf)
11692        } else {
11693            Bytes::new(__input)
11694        };
11695        let mut __struct = Self::default();
11696        __struct.target_network = buf.get_u8()?;
11697        __struct.target_system = buf.get_u8()?;
11698        __struct.target_component = buf.get_u8()?;
11699        for v in &mut __struct.payload {
11700            let val = buf.get_u8()?;
11701            *v = val;
11702        }
11703        Ok(__struct)
11704    }
11705    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11706        let mut __tmp = BytesMut::new(bytes);
11707        #[allow(clippy::absurd_extreme_comparisons)]
11708        #[allow(unused_comparisons)]
11709        if __tmp.remaining() < Self::ENCODED_LEN {
11710            panic!(
11711                "buffer is too small (need {} bytes, but got {})",
11712                Self::ENCODED_LEN,
11713                __tmp.remaining(),
11714            )
11715        }
11716        __tmp.put_u8(self.target_network);
11717        __tmp.put_u8(self.target_system);
11718        __tmp.put_u8(self.target_component);
11719        for val in &self.payload {
11720            __tmp.put_u8(*val);
11721        }
11722        if matches!(version, MavlinkVersion::V2) {
11723            let len = __tmp.len();
11724            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11725        } else {
11726            __tmp.len()
11727        }
11728    }
11729}
11730#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
11731#[doc = ""]
11732#[doc = "ID: 264"]
11733#[derive(Debug, Clone, PartialEq)]
11734#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11735#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11736#[cfg_attr(feature = "ts", derive(TS))]
11737#[cfg_attr(feature = "ts", ts(export))]
11738pub struct FLIGHT_INFORMATION_DATA {
11739    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
11740    pub arming_time_utc: u64,
11741    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
11742    pub takeoff_time_utc: u64,
11743    #[doc = "Flight number. Note, field is misnamed UUID."]
11744    pub flight_uuid: u64,
11745    #[doc = "Timestamp (time since system boot)."]
11746    pub time_boot_ms: u32,
11747    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
11748    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11749    pub landing_time: u32,
11750}
11751impl FLIGHT_INFORMATION_DATA {
11752    pub const ENCODED_LEN: usize = 32usize;
11753    pub const DEFAULT: Self = Self {
11754        arming_time_utc: 0_u64,
11755        takeoff_time_utc: 0_u64,
11756        flight_uuid: 0_u64,
11757        time_boot_ms: 0_u32,
11758        landing_time: 0_u32,
11759    };
11760    #[cfg(feature = "arbitrary")]
11761    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11762        use arbitrary::{Arbitrary, Unstructured};
11763        let mut buf = [0u8; 1024];
11764        rng.fill_bytes(&mut buf);
11765        let mut unstructured = Unstructured::new(&buf);
11766        Self::arbitrary(&mut unstructured).unwrap_or_default()
11767    }
11768}
11769impl Default for FLIGHT_INFORMATION_DATA {
11770    fn default() -> Self {
11771        Self::DEFAULT.clone()
11772    }
11773}
11774impl MessageData for FLIGHT_INFORMATION_DATA {
11775    type Message = MavMessage;
11776    const ID: u32 = 264u32;
11777    const NAME: &'static str = "FLIGHT_INFORMATION";
11778    const EXTRA_CRC: u8 = 49u8;
11779    const ENCODED_LEN: usize = 32usize;
11780    fn deser(
11781        _version: MavlinkVersion,
11782        __input: &[u8],
11783    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11784        let avail_len = __input.len();
11785        let mut payload_buf = [0; Self::ENCODED_LEN];
11786        let mut buf = if avail_len < Self::ENCODED_LEN {
11787            payload_buf[0..avail_len].copy_from_slice(__input);
11788            Bytes::new(&payload_buf)
11789        } else {
11790            Bytes::new(__input)
11791        };
11792        let mut __struct = Self::default();
11793        __struct.arming_time_utc = buf.get_u64_le()?;
11794        __struct.takeoff_time_utc = buf.get_u64_le()?;
11795        __struct.flight_uuid = buf.get_u64_le()?;
11796        __struct.time_boot_ms = buf.get_u32_le()?;
11797        __struct.landing_time = buf.get_u32_le()?;
11798        Ok(__struct)
11799    }
11800    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11801        let mut __tmp = BytesMut::new(bytes);
11802        #[allow(clippy::absurd_extreme_comparisons)]
11803        #[allow(unused_comparisons)]
11804        if __tmp.remaining() < Self::ENCODED_LEN {
11805            panic!(
11806                "buffer is too small (need {} bytes, but got {})",
11807                Self::ENCODED_LEN,
11808                __tmp.remaining(),
11809            )
11810        }
11811        __tmp.put_u64_le(self.arming_time_utc);
11812        __tmp.put_u64_le(self.takeoff_time_utc);
11813        __tmp.put_u64_le(self.flight_uuid);
11814        __tmp.put_u32_le(self.time_boot_ms);
11815        if matches!(version, MavlinkVersion::V2) {
11816            __tmp.put_u32_le(self.landing_time);
11817            let len = __tmp.len();
11818            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11819        } else {
11820            __tmp.len()
11821        }
11822    }
11823}
11824#[doc = "Current motion information from a designated system."]
11825#[doc = ""]
11826#[doc = "ID: 144"]
11827#[derive(Debug, Clone, PartialEq)]
11828#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11829#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11830#[cfg_attr(feature = "ts", derive(TS))]
11831#[cfg_attr(feature = "ts", ts(export))]
11832pub struct FOLLOW_TARGET_DATA {
11833    #[doc = "Timestamp (time since system boot)."]
11834    pub timestamp: u64,
11835    #[doc = "button states or switches of a tracker device"]
11836    pub custom_state: u64,
11837    #[doc = "Latitude (WGS84)"]
11838    pub lat: i32,
11839    #[doc = "Longitude (WGS84)"]
11840    pub lon: i32,
11841    #[doc = "Altitude (MSL)"]
11842    pub alt: f32,
11843    #[doc = "target velocity (0,0,0) for unknown"]
11844    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11845    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11846    pub vel: [f32; 3],
11847    #[doc = "linear target acceleration (0,0,0) for unknown"]
11848    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11849    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11850    pub acc: [f32; 3],
11851    #[doc = "(0 0 0 0 for unknown)"]
11852    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11853    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11854    pub attitude_q: [f32; 4],
11855    #[doc = "(0 0 0 for unknown)"]
11856    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11857    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11858    pub rates: [f32; 3],
11859    #[doc = "eph epv"]
11860    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11861    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11862    pub position_cov: [f32; 3],
11863    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
11864    pub est_capabilities: u8,
11865}
11866impl FOLLOW_TARGET_DATA {
11867    pub const ENCODED_LEN: usize = 93usize;
11868    pub const DEFAULT: Self = Self {
11869        timestamp: 0_u64,
11870        custom_state: 0_u64,
11871        lat: 0_i32,
11872        lon: 0_i32,
11873        alt: 0.0_f32,
11874        vel: [0.0_f32; 3usize],
11875        acc: [0.0_f32; 3usize],
11876        attitude_q: [0.0_f32; 4usize],
11877        rates: [0.0_f32; 3usize],
11878        position_cov: [0.0_f32; 3usize],
11879        est_capabilities: 0_u8,
11880    };
11881    #[cfg(feature = "arbitrary")]
11882    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11883        use arbitrary::{Arbitrary, Unstructured};
11884        let mut buf = [0u8; 1024];
11885        rng.fill_bytes(&mut buf);
11886        let mut unstructured = Unstructured::new(&buf);
11887        Self::arbitrary(&mut unstructured).unwrap_or_default()
11888    }
11889}
11890impl Default for FOLLOW_TARGET_DATA {
11891    fn default() -> Self {
11892        Self::DEFAULT.clone()
11893    }
11894}
11895impl MessageData for FOLLOW_TARGET_DATA {
11896    type Message = MavMessage;
11897    const ID: u32 = 144u32;
11898    const NAME: &'static str = "FOLLOW_TARGET";
11899    const EXTRA_CRC: u8 = 127u8;
11900    const ENCODED_LEN: usize = 93usize;
11901    fn deser(
11902        _version: MavlinkVersion,
11903        __input: &[u8],
11904    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11905        let avail_len = __input.len();
11906        let mut payload_buf = [0; Self::ENCODED_LEN];
11907        let mut buf = if avail_len < Self::ENCODED_LEN {
11908            payload_buf[0..avail_len].copy_from_slice(__input);
11909            Bytes::new(&payload_buf)
11910        } else {
11911            Bytes::new(__input)
11912        };
11913        let mut __struct = Self::default();
11914        __struct.timestamp = buf.get_u64_le()?;
11915        __struct.custom_state = buf.get_u64_le()?;
11916        __struct.lat = buf.get_i32_le()?;
11917        __struct.lon = buf.get_i32_le()?;
11918        __struct.alt = buf.get_f32_le()?;
11919        for v in &mut __struct.vel {
11920            let val = buf.get_f32_le()?;
11921            *v = val;
11922        }
11923        for v in &mut __struct.acc {
11924            let val = buf.get_f32_le()?;
11925            *v = val;
11926        }
11927        for v in &mut __struct.attitude_q {
11928            let val = buf.get_f32_le()?;
11929            *v = val;
11930        }
11931        for v in &mut __struct.rates {
11932            let val = buf.get_f32_le()?;
11933            *v = val;
11934        }
11935        for v in &mut __struct.position_cov {
11936            let val = buf.get_f32_le()?;
11937            *v = val;
11938        }
11939        __struct.est_capabilities = buf.get_u8()?;
11940        Ok(__struct)
11941    }
11942    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11943        let mut __tmp = BytesMut::new(bytes);
11944        #[allow(clippy::absurd_extreme_comparisons)]
11945        #[allow(unused_comparisons)]
11946        if __tmp.remaining() < Self::ENCODED_LEN {
11947            panic!(
11948                "buffer is too small (need {} bytes, but got {})",
11949                Self::ENCODED_LEN,
11950                __tmp.remaining(),
11951            )
11952        }
11953        __tmp.put_u64_le(self.timestamp);
11954        __tmp.put_u64_le(self.custom_state);
11955        __tmp.put_i32_le(self.lat);
11956        __tmp.put_i32_le(self.lon);
11957        __tmp.put_f32_le(self.alt);
11958        for val in &self.vel {
11959            __tmp.put_f32_le(*val);
11960        }
11961        for val in &self.acc {
11962            __tmp.put_f32_le(*val);
11963        }
11964        for val in &self.attitude_q {
11965            __tmp.put_f32_le(*val);
11966        }
11967        for val in &self.rates {
11968            __tmp.put_f32_le(*val);
11969        }
11970        for val in &self.position_cov {
11971            __tmp.put_f32_le(*val);
11972        }
11973        __tmp.put_u8(self.est_capabilities);
11974        if matches!(version, MavlinkVersion::V2) {
11975            let len = __tmp.len();
11976            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11977        } else {
11978            __tmp.len()
11979        }
11980    }
11981}
11982#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
11983#[doc = ""]
11984#[doc = "ID: 371"]
11985#[derive(Debug, Clone, PartialEq)]
11986#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11988#[cfg_attr(feature = "ts", derive(TS))]
11989#[cfg_attr(feature = "ts", ts(export))]
11990pub struct FUEL_STATUS_DATA {
11991    #[doc = "Capacity when full. Must be provided."]
11992    pub maximum_fuel: f32,
11993    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
11994    pub consumed_fuel: f32,
11995    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
11996    pub remaining_fuel: f32,
11997    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
11998    pub flow_rate: f32,
11999    #[doc = "Fuel temperature. NaN: field not provided."]
12000    pub temperature: f32,
12001    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12002    pub fuel_type: MavFuelType,
12003    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12004    pub id: u8,
12005    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12006    pub percent_remaining: u8,
12007}
12008impl FUEL_STATUS_DATA {
12009    pub const ENCODED_LEN: usize = 26usize;
12010    pub const DEFAULT: Self = Self {
12011        maximum_fuel: 0.0_f32,
12012        consumed_fuel: 0.0_f32,
12013        remaining_fuel: 0.0_f32,
12014        flow_rate: 0.0_f32,
12015        temperature: 0.0_f32,
12016        fuel_type: MavFuelType::DEFAULT,
12017        id: 0_u8,
12018        percent_remaining: 0_u8,
12019    };
12020    #[cfg(feature = "arbitrary")]
12021    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12022        use arbitrary::{Arbitrary, Unstructured};
12023        let mut buf = [0u8; 1024];
12024        rng.fill_bytes(&mut buf);
12025        let mut unstructured = Unstructured::new(&buf);
12026        Self::arbitrary(&mut unstructured).unwrap_or_default()
12027    }
12028}
12029impl Default for FUEL_STATUS_DATA {
12030    fn default() -> Self {
12031        Self::DEFAULT.clone()
12032    }
12033}
12034impl MessageData for FUEL_STATUS_DATA {
12035    type Message = MavMessage;
12036    const ID: u32 = 371u32;
12037    const NAME: &'static str = "FUEL_STATUS";
12038    const EXTRA_CRC: u8 = 10u8;
12039    const ENCODED_LEN: usize = 26usize;
12040    fn deser(
12041        _version: MavlinkVersion,
12042        __input: &[u8],
12043    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12044        let avail_len = __input.len();
12045        let mut payload_buf = [0; Self::ENCODED_LEN];
12046        let mut buf = if avail_len < Self::ENCODED_LEN {
12047            payload_buf[0..avail_len].copy_from_slice(__input);
12048            Bytes::new(&payload_buf)
12049        } else {
12050            Bytes::new(__input)
12051        };
12052        let mut __struct = Self::default();
12053        __struct.maximum_fuel = buf.get_f32_le()?;
12054        __struct.consumed_fuel = buf.get_f32_le()?;
12055        __struct.remaining_fuel = buf.get_f32_le()?;
12056        __struct.flow_rate = buf.get_f32_le()?;
12057        __struct.temperature = buf.get_f32_le()?;
12058        let tmp = buf.get_u32_le()?;
12059        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12060            ::mavlink_core::error::ParserError::InvalidEnum {
12061                enum_type: "MavFuelType",
12062                value: tmp as u64,
12063            },
12064        )?;
12065        __struct.id = buf.get_u8()?;
12066        __struct.percent_remaining = buf.get_u8()?;
12067        Ok(__struct)
12068    }
12069    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12070        let mut __tmp = BytesMut::new(bytes);
12071        #[allow(clippy::absurd_extreme_comparisons)]
12072        #[allow(unused_comparisons)]
12073        if __tmp.remaining() < Self::ENCODED_LEN {
12074            panic!(
12075                "buffer is too small (need {} bytes, but got {})",
12076                Self::ENCODED_LEN,
12077                __tmp.remaining(),
12078            )
12079        }
12080        __tmp.put_f32_le(self.maximum_fuel);
12081        __tmp.put_f32_le(self.consumed_fuel);
12082        __tmp.put_f32_le(self.remaining_fuel);
12083        __tmp.put_f32_le(self.flow_rate);
12084        __tmp.put_f32_le(self.temperature);
12085        __tmp.put_u32_le(self.fuel_type as u32);
12086        __tmp.put_u8(self.id);
12087        __tmp.put_u8(self.percent_remaining);
12088        if matches!(version, MavlinkVersion::V2) {
12089            let len = __tmp.len();
12090            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12091        } else {
12092            __tmp.len()
12093        }
12094    }
12095}
12096#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12097#[doc = ""]
12098#[doc = "ID: 373"]
12099#[derive(Debug, Clone, PartialEq)]
12100#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12101#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12102#[cfg_attr(feature = "ts", derive(TS))]
12103#[cfg_attr(feature = "ts", ts(export))]
12104pub struct GENERATOR_STATUS_DATA {
12105    #[doc = "Status flags."]
12106    pub status: MavGeneratorStatusFlag,
12107    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12108    pub battery_current: f32,
12109    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12110    pub load_current: f32,
12111    #[doc = "The power being generated. NaN: field not provided"]
12112    pub power_generated: f32,
12113    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12114    pub bus_voltage: f32,
12115    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12116    pub bat_current_setpoint: f32,
12117    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12118    pub runtime: u32,
12119    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12120    pub time_until_maintenance: i32,
12121    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12122    pub generator_speed: u16,
12123    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12124    pub rectifier_temperature: i16,
12125    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12126    pub generator_temperature: i16,
12127}
12128impl GENERATOR_STATUS_DATA {
12129    pub const ENCODED_LEN: usize = 42usize;
12130    pub const DEFAULT: Self = Self {
12131        status: MavGeneratorStatusFlag::DEFAULT,
12132        battery_current: 0.0_f32,
12133        load_current: 0.0_f32,
12134        power_generated: 0.0_f32,
12135        bus_voltage: 0.0_f32,
12136        bat_current_setpoint: 0.0_f32,
12137        runtime: 0_u32,
12138        time_until_maintenance: 0_i32,
12139        generator_speed: 0_u16,
12140        rectifier_temperature: 0_i16,
12141        generator_temperature: 0_i16,
12142    };
12143    #[cfg(feature = "arbitrary")]
12144    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12145        use arbitrary::{Arbitrary, Unstructured};
12146        let mut buf = [0u8; 1024];
12147        rng.fill_bytes(&mut buf);
12148        let mut unstructured = Unstructured::new(&buf);
12149        Self::arbitrary(&mut unstructured).unwrap_or_default()
12150    }
12151}
12152impl Default for GENERATOR_STATUS_DATA {
12153    fn default() -> Self {
12154        Self::DEFAULT.clone()
12155    }
12156}
12157impl MessageData for GENERATOR_STATUS_DATA {
12158    type Message = MavMessage;
12159    const ID: u32 = 373u32;
12160    const NAME: &'static str = "GENERATOR_STATUS";
12161    const EXTRA_CRC: u8 = 117u8;
12162    const ENCODED_LEN: usize = 42usize;
12163    fn deser(
12164        _version: MavlinkVersion,
12165        __input: &[u8],
12166    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12167        let avail_len = __input.len();
12168        let mut payload_buf = [0; Self::ENCODED_LEN];
12169        let mut buf = if avail_len < Self::ENCODED_LEN {
12170            payload_buf[0..avail_len].copy_from_slice(__input);
12171            Bytes::new(&payload_buf)
12172        } else {
12173            Bytes::new(__input)
12174        };
12175        let mut __struct = Self::default();
12176        let tmp = buf.get_u64_le()?;
12177        __struct.status =
12178            MavGeneratorStatusFlag::from_bits(tmp as <MavGeneratorStatusFlag as Flags>::Bits)
12179                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12180                    flag_type: "MavGeneratorStatusFlag",
12181                    value: tmp as u64,
12182                })?;
12183        __struct.battery_current = buf.get_f32_le()?;
12184        __struct.load_current = buf.get_f32_le()?;
12185        __struct.power_generated = buf.get_f32_le()?;
12186        __struct.bus_voltage = buf.get_f32_le()?;
12187        __struct.bat_current_setpoint = buf.get_f32_le()?;
12188        __struct.runtime = buf.get_u32_le()?;
12189        __struct.time_until_maintenance = buf.get_i32_le()?;
12190        __struct.generator_speed = buf.get_u16_le()?;
12191        __struct.rectifier_temperature = buf.get_i16_le()?;
12192        __struct.generator_temperature = buf.get_i16_le()?;
12193        Ok(__struct)
12194    }
12195    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12196        let mut __tmp = BytesMut::new(bytes);
12197        #[allow(clippy::absurd_extreme_comparisons)]
12198        #[allow(unused_comparisons)]
12199        if __tmp.remaining() < Self::ENCODED_LEN {
12200            panic!(
12201                "buffer is too small (need {} bytes, but got {})",
12202                Self::ENCODED_LEN,
12203                __tmp.remaining(),
12204            )
12205        }
12206        __tmp.put_u64_le(self.status.bits() as u64);
12207        __tmp.put_f32_le(self.battery_current);
12208        __tmp.put_f32_le(self.load_current);
12209        __tmp.put_f32_le(self.power_generated);
12210        __tmp.put_f32_le(self.bus_voltage);
12211        __tmp.put_f32_le(self.bat_current_setpoint);
12212        __tmp.put_u32_le(self.runtime);
12213        __tmp.put_i32_le(self.time_until_maintenance);
12214        __tmp.put_u16_le(self.generator_speed);
12215        __tmp.put_i16_le(self.rectifier_temperature);
12216        __tmp.put_i16_le(self.generator_temperature);
12217        if matches!(version, MavlinkVersion::V2) {
12218            let len = __tmp.len();
12219            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12220        } else {
12221            __tmp.len()
12222        }
12223    }
12224}
12225#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12226#[doc = ""]
12227#[doc = "ID: 285"]
12228#[derive(Debug, Clone, PartialEq)]
12229#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12230#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12231#[cfg_attr(feature = "ts", derive(TS))]
12232#[cfg_attr(feature = "ts", ts(export))]
12233pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12234    #[doc = "Timestamp (time since system boot)."]
12235    pub time_boot_ms: u32,
12236    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12237    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12238    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12239    pub q: [f32; 4],
12240    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12241    pub angular_velocity_x: f32,
12242    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12243    pub angular_velocity_y: f32,
12244    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12245    pub angular_velocity_z: f32,
12246    #[doc = "Failure flags (0 for no failure)"]
12247    pub failure_flags: GimbalDeviceErrorFlags,
12248    #[doc = "Current gimbal flags set."]
12249    pub flags: GimbalDeviceFlags,
12250    #[doc = "System ID"]
12251    pub target_system: u8,
12252    #[doc = "Component ID"]
12253    pub target_component: u8,
12254    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12255    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12256    pub delta_yaw: f32,
12257    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12258    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12259    pub delta_yaw_velocity: f32,
12260    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12261    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12262    pub gimbal_device_id: u8,
12263}
12264impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12265    pub const ENCODED_LEN: usize = 49usize;
12266    pub const DEFAULT: Self = Self {
12267        time_boot_ms: 0_u32,
12268        q: [0.0_f32; 4usize],
12269        angular_velocity_x: 0.0_f32,
12270        angular_velocity_y: 0.0_f32,
12271        angular_velocity_z: 0.0_f32,
12272        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12273        flags: GimbalDeviceFlags::DEFAULT,
12274        target_system: 0_u8,
12275        target_component: 0_u8,
12276        delta_yaw: 0.0_f32,
12277        delta_yaw_velocity: 0.0_f32,
12278        gimbal_device_id: 0_u8,
12279    };
12280    #[cfg(feature = "arbitrary")]
12281    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12282        use arbitrary::{Arbitrary, Unstructured};
12283        let mut buf = [0u8; 1024];
12284        rng.fill_bytes(&mut buf);
12285        let mut unstructured = Unstructured::new(&buf);
12286        Self::arbitrary(&mut unstructured).unwrap_or_default()
12287    }
12288}
12289impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12290    fn default() -> Self {
12291        Self::DEFAULT.clone()
12292    }
12293}
12294impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12295    type Message = MavMessage;
12296    const ID: u32 = 285u32;
12297    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12298    const EXTRA_CRC: u8 = 137u8;
12299    const ENCODED_LEN: usize = 49usize;
12300    fn deser(
12301        _version: MavlinkVersion,
12302        __input: &[u8],
12303    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12304        let avail_len = __input.len();
12305        let mut payload_buf = [0; Self::ENCODED_LEN];
12306        let mut buf = if avail_len < Self::ENCODED_LEN {
12307            payload_buf[0..avail_len].copy_from_slice(__input);
12308            Bytes::new(&payload_buf)
12309        } else {
12310            Bytes::new(__input)
12311        };
12312        let mut __struct = Self::default();
12313        __struct.time_boot_ms = buf.get_u32_le()?;
12314        for v in &mut __struct.q {
12315            let val = buf.get_f32_le()?;
12316            *v = val;
12317        }
12318        __struct.angular_velocity_x = buf.get_f32_le()?;
12319        __struct.angular_velocity_y = buf.get_f32_le()?;
12320        __struct.angular_velocity_z = buf.get_f32_le()?;
12321        let tmp = buf.get_u32_le()?;
12322        __struct.failure_flags =
12323            GimbalDeviceErrorFlags::from_bits(tmp as <GimbalDeviceErrorFlags as Flags>::Bits)
12324                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12325                    flag_type: "GimbalDeviceErrorFlags",
12326                    value: tmp as u64,
12327                })?;
12328        let tmp = buf.get_u16_le()?;
12329        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
12330            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12331                flag_type: "GimbalDeviceFlags",
12332                value: tmp as u64,
12333            })?;
12334        __struct.target_system = buf.get_u8()?;
12335        __struct.target_component = buf.get_u8()?;
12336        __struct.delta_yaw = buf.get_f32_le()?;
12337        __struct.delta_yaw_velocity = buf.get_f32_le()?;
12338        __struct.gimbal_device_id = buf.get_u8()?;
12339        Ok(__struct)
12340    }
12341    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12342        let mut __tmp = BytesMut::new(bytes);
12343        #[allow(clippy::absurd_extreme_comparisons)]
12344        #[allow(unused_comparisons)]
12345        if __tmp.remaining() < Self::ENCODED_LEN {
12346            panic!(
12347                "buffer is too small (need {} bytes, but got {})",
12348                Self::ENCODED_LEN,
12349                __tmp.remaining(),
12350            )
12351        }
12352        __tmp.put_u32_le(self.time_boot_ms);
12353        for val in &self.q {
12354            __tmp.put_f32_le(*val);
12355        }
12356        __tmp.put_f32_le(self.angular_velocity_x);
12357        __tmp.put_f32_le(self.angular_velocity_y);
12358        __tmp.put_f32_le(self.angular_velocity_z);
12359        __tmp.put_u32_le(self.failure_flags.bits() as u32);
12360        __tmp.put_u16_le(self.flags.bits() as u16);
12361        __tmp.put_u8(self.target_system);
12362        __tmp.put_u8(self.target_component);
12363        if matches!(version, MavlinkVersion::V2) {
12364            __tmp.put_f32_le(self.delta_yaw);
12365            __tmp.put_f32_le(self.delta_yaw_velocity);
12366            __tmp.put_u8(self.gimbal_device_id);
12367            let len = __tmp.len();
12368            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12369        } else {
12370            __tmp.len()
12371        }
12372    }
12373}
12374#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12375#[doc = ""]
12376#[doc = "ID: 283"]
12377#[derive(Debug, Clone, PartialEq)]
12378#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12379#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12380#[cfg_attr(feature = "ts", derive(TS))]
12381#[cfg_attr(feature = "ts", ts(export))]
12382pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12383    #[doc = "UID of gimbal hardware (0 if unknown)."]
12384    pub uid: u64,
12385    #[doc = "Timestamp (time since system boot)."]
12386    pub time_boot_ms: u32,
12387    #[doc = "Version of the gimbal firmware, encoded as: (Dev&amp;0xff)&lt;&lt;24 | (Patch&amp;0xff)&lt;&lt;16 | (Minor&amp;0xff)&lt;&lt;8 | (Major&amp;0xff)."]
12388    pub firmware_version: u32,
12389    #[doc = "Version of the gimbal hardware, encoded as: (Dev&amp;0xff)&lt;&lt;24 | (Patch&amp;0xff)&lt;&lt;16 | (Minor&amp;0xff)&lt;&lt;8 | (Major&amp;0xff)."]
12390    pub hardware_version: u32,
12391    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12392    pub roll_min: f32,
12393    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12394    pub roll_max: f32,
12395    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12396    pub pitch_min: f32,
12397    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12398    pub pitch_max: f32,
12399    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12400    pub yaw_min: f32,
12401    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12402    pub yaw_max: f32,
12403    #[doc = "Bitmap of gimbal capability flags."]
12404    pub cap_flags: GimbalDeviceCapFlags,
12405    #[doc = "Bitmap for use for gimbal-specific capability flags."]
12406    pub custom_cap_flags: u16,
12407    #[doc = "Name of the gimbal vendor."]
12408    #[cfg_attr(feature = "ts", ts(type = "string"))]
12409    pub vendor_name: CharArray<32>,
12410    #[doc = "Name of the gimbal model."]
12411    #[cfg_attr(feature = "ts", ts(type = "string"))]
12412    pub model_name: CharArray<32>,
12413    #[doc = "Custom name of the gimbal given to it by the user."]
12414    #[cfg_attr(feature = "ts", ts(type = "string"))]
12415    pub custom_name: CharArray<32>,
12416    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12417    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12418    pub gimbal_device_id: u8,
12419}
12420impl GIMBAL_DEVICE_INFORMATION_DATA {
12421    pub const ENCODED_LEN: usize = 145usize;
12422    pub const DEFAULT: Self = Self {
12423        uid: 0_u64,
12424        time_boot_ms: 0_u32,
12425        firmware_version: 0_u32,
12426        hardware_version: 0_u32,
12427        roll_min: 0.0_f32,
12428        roll_max: 0.0_f32,
12429        pitch_min: 0.0_f32,
12430        pitch_max: 0.0_f32,
12431        yaw_min: 0.0_f32,
12432        yaw_max: 0.0_f32,
12433        cap_flags: GimbalDeviceCapFlags::DEFAULT,
12434        custom_cap_flags: 0_u16,
12435        vendor_name: CharArray::new([0_u8; 32usize]),
12436        model_name: CharArray::new([0_u8; 32usize]),
12437        custom_name: CharArray::new([0_u8; 32usize]),
12438        gimbal_device_id: 0_u8,
12439    };
12440    #[cfg(feature = "arbitrary")]
12441    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12442        use arbitrary::{Arbitrary, Unstructured};
12443        let mut buf = [0u8; 1024];
12444        rng.fill_bytes(&mut buf);
12445        let mut unstructured = Unstructured::new(&buf);
12446        Self::arbitrary(&mut unstructured).unwrap_or_default()
12447    }
12448}
12449impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12450    fn default() -> Self {
12451        Self::DEFAULT.clone()
12452    }
12453}
12454impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12455    type Message = MavMessage;
12456    const ID: u32 = 283u32;
12457    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12458    const EXTRA_CRC: u8 = 74u8;
12459    const ENCODED_LEN: usize = 145usize;
12460    fn deser(
12461        _version: MavlinkVersion,
12462        __input: &[u8],
12463    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12464        let avail_len = __input.len();
12465        let mut payload_buf = [0; Self::ENCODED_LEN];
12466        let mut buf = if avail_len < Self::ENCODED_LEN {
12467            payload_buf[0..avail_len].copy_from_slice(__input);
12468            Bytes::new(&payload_buf)
12469        } else {
12470            Bytes::new(__input)
12471        };
12472        let mut __struct = Self::default();
12473        __struct.uid = buf.get_u64_le()?;
12474        __struct.time_boot_ms = buf.get_u32_le()?;
12475        __struct.firmware_version = buf.get_u32_le()?;
12476        __struct.hardware_version = buf.get_u32_le()?;
12477        __struct.roll_min = buf.get_f32_le()?;
12478        __struct.roll_max = buf.get_f32_le()?;
12479        __struct.pitch_min = buf.get_f32_le()?;
12480        __struct.pitch_max = buf.get_f32_le()?;
12481        __struct.yaw_min = buf.get_f32_le()?;
12482        __struct.yaw_max = buf.get_f32_le()?;
12483        let tmp = buf.get_u16_le()?;
12484        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
12485            tmp as <GimbalDeviceCapFlags as Flags>::Bits,
12486        )
12487        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12488            flag_type: "GimbalDeviceCapFlags",
12489            value: tmp as u64,
12490        })?;
12491        __struct.custom_cap_flags = buf.get_u16_le()?;
12492        let mut tmp = [0_u8; 32usize];
12493        for v in &mut tmp {
12494            *v = buf.get_u8()?;
12495        }
12496        __struct.vendor_name = CharArray::new(tmp);
12497        let mut tmp = [0_u8; 32usize];
12498        for v in &mut tmp {
12499            *v = buf.get_u8()?;
12500        }
12501        __struct.model_name = CharArray::new(tmp);
12502        let mut tmp = [0_u8; 32usize];
12503        for v in &mut tmp {
12504            *v = buf.get_u8()?;
12505        }
12506        __struct.custom_name = CharArray::new(tmp);
12507        __struct.gimbal_device_id = buf.get_u8()?;
12508        Ok(__struct)
12509    }
12510    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12511        let mut __tmp = BytesMut::new(bytes);
12512        #[allow(clippy::absurd_extreme_comparisons)]
12513        #[allow(unused_comparisons)]
12514        if __tmp.remaining() < Self::ENCODED_LEN {
12515            panic!(
12516                "buffer is too small (need {} bytes, but got {})",
12517                Self::ENCODED_LEN,
12518                __tmp.remaining(),
12519            )
12520        }
12521        __tmp.put_u64_le(self.uid);
12522        __tmp.put_u32_le(self.time_boot_ms);
12523        __tmp.put_u32_le(self.firmware_version);
12524        __tmp.put_u32_le(self.hardware_version);
12525        __tmp.put_f32_le(self.roll_min);
12526        __tmp.put_f32_le(self.roll_max);
12527        __tmp.put_f32_le(self.pitch_min);
12528        __tmp.put_f32_le(self.pitch_max);
12529        __tmp.put_f32_le(self.yaw_min);
12530        __tmp.put_f32_le(self.yaw_max);
12531        __tmp.put_u16_le(self.cap_flags.bits() as u16);
12532        __tmp.put_u16_le(self.custom_cap_flags);
12533        for val in &self.vendor_name {
12534            __tmp.put_u8(*val);
12535        }
12536        for val in &self.model_name {
12537            __tmp.put_u8(*val);
12538        }
12539        for val in &self.custom_name {
12540            __tmp.put_u8(*val);
12541        }
12542        if matches!(version, MavlinkVersion::V2) {
12543            __tmp.put_u8(self.gimbal_device_id);
12544            let len = __tmp.len();
12545            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12546        } else {
12547            __tmp.len()
12548        }
12549    }
12550}
12551#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
12552#[doc = ""]
12553#[doc = "ID: 284"]
12554#[derive(Debug, Clone, PartialEq)]
12555#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12556#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12557#[cfg_attr(feature = "ts", derive(TS))]
12558#[cfg_attr(feature = "ts", ts(export))]
12559pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12560    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
12561    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12562    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12563    pub q: [f32; 4],
12564    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
12565    pub angular_velocity_x: f32,
12566    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
12567    pub angular_velocity_y: f32,
12568    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
12569    pub angular_velocity_z: f32,
12570    #[doc = "Low level gimbal flags."]
12571    pub flags: GimbalDeviceFlags,
12572    #[doc = "System ID"]
12573    pub target_system: u8,
12574    #[doc = "Component ID"]
12575    pub target_component: u8,
12576}
12577impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12578    pub const ENCODED_LEN: usize = 32usize;
12579    pub const DEFAULT: Self = Self {
12580        q: [0.0_f32; 4usize],
12581        angular_velocity_x: 0.0_f32,
12582        angular_velocity_y: 0.0_f32,
12583        angular_velocity_z: 0.0_f32,
12584        flags: GimbalDeviceFlags::DEFAULT,
12585        target_system: 0_u8,
12586        target_component: 0_u8,
12587    };
12588    #[cfg(feature = "arbitrary")]
12589    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12590        use arbitrary::{Arbitrary, Unstructured};
12591        let mut buf = [0u8; 1024];
12592        rng.fill_bytes(&mut buf);
12593        let mut unstructured = Unstructured::new(&buf);
12594        Self::arbitrary(&mut unstructured).unwrap_or_default()
12595    }
12596}
12597impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12598    fn default() -> Self {
12599        Self::DEFAULT.clone()
12600    }
12601}
12602impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12603    type Message = MavMessage;
12604    const ID: u32 = 284u32;
12605    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
12606    const EXTRA_CRC: u8 = 99u8;
12607    const ENCODED_LEN: usize = 32usize;
12608    fn deser(
12609        _version: MavlinkVersion,
12610        __input: &[u8],
12611    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12612        let avail_len = __input.len();
12613        let mut payload_buf = [0; Self::ENCODED_LEN];
12614        let mut buf = if avail_len < Self::ENCODED_LEN {
12615            payload_buf[0..avail_len].copy_from_slice(__input);
12616            Bytes::new(&payload_buf)
12617        } else {
12618            Bytes::new(__input)
12619        };
12620        let mut __struct = Self::default();
12621        for v in &mut __struct.q {
12622            let val = buf.get_f32_le()?;
12623            *v = val;
12624        }
12625        __struct.angular_velocity_x = buf.get_f32_le()?;
12626        __struct.angular_velocity_y = buf.get_f32_le()?;
12627        __struct.angular_velocity_z = buf.get_f32_le()?;
12628        let tmp = buf.get_u16_le()?;
12629        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
12630            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12631                flag_type: "GimbalDeviceFlags",
12632                value: tmp as u64,
12633            })?;
12634        __struct.target_system = buf.get_u8()?;
12635        __struct.target_component = buf.get_u8()?;
12636        Ok(__struct)
12637    }
12638    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12639        let mut __tmp = BytesMut::new(bytes);
12640        #[allow(clippy::absurd_extreme_comparisons)]
12641        #[allow(unused_comparisons)]
12642        if __tmp.remaining() < Self::ENCODED_LEN {
12643            panic!(
12644                "buffer is too small (need {} bytes, but got {})",
12645                Self::ENCODED_LEN,
12646                __tmp.remaining(),
12647            )
12648        }
12649        for val in &self.q {
12650            __tmp.put_f32_le(*val);
12651        }
12652        __tmp.put_f32_le(self.angular_velocity_x);
12653        __tmp.put_f32_le(self.angular_velocity_y);
12654        __tmp.put_f32_le(self.angular_velocity_z);
12655        __tmp.put_u16_le(self.flags.bits() as u16);
12656        __tmp.put_u8(self.target_system);
12657        __tmp.put_u8(self.target_component);
12658        if matches!(version, MavlinkVersion::V2) {
12659            let len = __tmp.len();
12660            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12661        } else {
12662            __tmp.len()
12663        }
12664    }
12665}
12666#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
12667#[doc = ""]
12668#[doc = "ID: 280"]
12669#[derive(Debug, Clone, PartialEq)]
12670#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12671#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12672#[cfg_attr(feature = "ts", derive(TS))]
12673#[cfg_attr(feature = "ts", ts(export))]
12674pub struct GIMBAL_MANAGER_INFORMATION_DATA {
12675    #[doc = "Timestamp (time since system boot)."]
12676    pub time_boot_ms: u32,
12677    #[doc = "Bitmap of gimbal capability flags."]
12678    pub cap_flags: GimbalManagerCapFlags,
12679    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12680    pub roll_min: f32,
12681    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12682    pub roll_max: f32,
12683    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
12684    pub pitch_min: f32,
12685    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
12686    pub pitch_max: f32,
12687    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
12688    pub yaw_min: f32,
12689    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
12690    pub yaw_max: f32,
12691    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
12692    pub gimbal_device_id: u8,
12693}
12694impl GIMBAL_MANAGER_INFORMATION_DATA {
12695    pub const ENCODED_LEN: usize = 33usize;
12696    pub const DEFAULT: Self = Self {
12697        time_boot_ms: 0_u32,
12698        cap_flags: GimbalManagerCapFlags::DEFAULT,
12699        roll_min: 0.0_f32,
12700        roll_max: 0.0_f32,
12701        pitch_min: 0.0_f32,
12702        pitch_max: 0.0_f32,
12703        yaw_min: 0.0_f32,
12704        yaw_max: 0.0_f32,
12705        gimbal_device_id: 0_u8,
12706    };
12707    #[cfg(feature = "arbitrary")]
12708    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12709        use arbitrary::{Arbitrary, Unstructured};
12710        let mut buf = [0u8; 1024];
12711        rng.fill_bytes(&mut buf);
12712        let mut unstructured = Unstructured::new(&buf);
12713        Self::arbitrary(&mut unstructured).unwrap_or_default()
12714    }
12715}
12716impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
12717    fn default() -> Self {
12718        Self::DEFAULT.clone()
12719    }
12720}
12721impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
12722    type Message = MavMessage;
12723    const ID: u32 = 280u32;
12724    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
12725    const EXTRA_CRC: u8 = 70u8;
12726    const ENCODED_LEN: usize = 33usize;
12727    fn deser(
12728        _version: MavlinkVersion,
12729        __input: &[u8],
12730    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12731        let avail_len = __input.len();
12732        let mut payload_buf = [0; Self::ENCODED_LEN];
12733        let mut buf = if avail_len < Self::ENCODED_LEN {
12734            payload_buf[0..avail_len].copy_from_slice(__input);
12735            Bytes::new(&payload_buf)
12736        } else {
12737            Bytes::new(__input)
12738        };
12739        let mut __struct = Self::default();
12740        __struct.time_boot_ms = buf.get_u32_le()?;
12741        let tmp = buf.get_u32_le()?;
12742        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
12743            tmp as <GimbalManagerCapFlags as Flags>::Bits,
12744        )
12745        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12746            flag_type: "GimbalManagerCapFlags",
12747            value: tmp as u64,
12748        })?;
12749        __struct.roll_min = buf.get_f32_le()?;
12750        __struct.roll_max = buf.get_f32_le()?;
12751        __struct.pitch_min = buf.get_f32_le()?;
12752        __struct.pitch_max = buf.get_f32_le()?;
12753        __struct.yaw_min = buf.get_f32_le()?;
12754        __struct.yaw_max = buf.get_f32_le()?;
12755        __struct.gimbal_device_id = buf.get_u8()?;
12756        Ok(__struct)
12757    }
12758    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12759        let mut __tmp = BytesMut::new(bytes);
12760        #[allow(clippy::absurd_extreme_comparisons)]
12761        #[allow(unused_comparisons)]
12762        if __tmp.remaining() < Self::ENCODED_LEN {
12763            panic!(
12764                "buffer is too small (need {} bytes, but got {})",
12765                Self::ENCODED_LEN,
12766                __tmp.remaining(),
12767            )
12768        }
12769        __tmp.put_u32_le(self.time_boot_ms);
12770        __tmp.put_u32_le(self.cap_flags.bits() as u32);
12771        __tmp.put_f32_le(self.roll_min);
12772        __tmp.put_f32_le(self.roll_max);
12773        __tmp.put_f32_le(self.pitch_min);
12774        __tmp.put_f32_le(self.pitch_max);
12775        __tmp.put_f32_le(self.yaw_min);
12776        __tmp.put_f32_le(self.yaw_max);
12777        __tmp.put_u8(self.gimbal_device_id);
12778        if matches!(version, MavlinkVersion::V2) {
12779            let len = __tmp.len();
12780            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12781        } else {
12782            __tmp.len()
12783        }
12784    }
12785}
12786#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12787#[doc = ""]
12788#[doc = "ID: 282"]
12789#[derive(Debug, Clone, PartialEq)]
12790#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12791#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12792#[cfg_attr(feature = "ts", derive(TS))]
12793#[cfg_attr(feature = "ts", ts(export))]
12794pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12795    #[doc = "High level gimbal manager flags to use."]
12796    pub flags: GimbalManagerFlags,
12797    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
12798    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12799    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12800    pub q: [f32; 4],
12801    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
12802    pub angular_velocity_x: f32,
12803    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
12804    pub angular_velocity_y: f32,
12805    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
12806    pub angular_velocity_z: f32,
12807    #[doc = "System ID"]
12808    pub target_system: u8,
12809    #[doc = "Component ID"]
12810    pub target_component: u8,
12811    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12812    pub gimbal_device_id: u8,
12813}
12814impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12815    pub const ENCODED_LEN: usize = 35usize;
12816    pub const DEFAULT: Self = Self {
12817        flags: GimbalManagerFlags::DEFAULT,
12818        q: [0.0_f32; 4usize],
12819        angular_velocity_x: 0.0_f32,
12820        angular_velocity_y: 0.0_f32,
12821        angular_velocity_z: 0.0_f32,
12822        target_system: 0_u8,
12823        target_component: 0_u8,
12824        gimbal_device_id: 0_u8,
12825    };
12826    #[cfg(feature = "arbitrary")]
12827    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12828        use arbitrary::{Arbitrary, Unstructured};
12829        let mut buf = [0u8; 1024];
12830        rng.fill_bytes(&mut buf);
12831        let mut unstructured = Unstructured::new(&buf);
12832        Self::arbitrary(&mut unstructured).unwrap_or_default()
12833    }
12834}
12835impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12836    fn default() -> Self {
12837        Self::DEFAULT.clone()
12838    }
12839}
12840impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12841    type Message = MavMessage;
12842    const ID: u32 = 282u32;
12843    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
12844    const EXTRA_CRC: u8 = 123u8;
12845    const ENCODED_LEN: usize = 35usize;
12846    fn deser(
12847        _version: MavlinkVersion,
12848        __input: &[u8],
12849    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12850        let avail_len = __input.len();
12851        let mut payload_buf = [0; Self::ENCODED_LEN];
12852        let mut buf = if avail_len < Self::ENCODED_LEN {
12853            payload_buf[0..avail_len].copy_from_slice(__input);
12854            Bytes::new(&payload_buf)
12855        } else {
12856            Bytes::new(__input)
12857        };
12858        let mut __struct = Self::default();
12859        let tmp = buf.get_u32_le()?;
12860        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
12861            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12862                flag_type: "GimbalManagerFlags",
12863                value: tmp as u64,
12864            })?;
12865        for v in &mut __struct.q {
12866            let val = buf.get_f32_le()?;
12867            *v = val;
12868        }
12869        __struct.angular_velocity_x = buf.get_f32_le()?;
12870        __struct.angular_velocity_y = buf.get_f32_le()?;
12871        __struct.angular_velocity_z = buf.get_f32_le()?;
12872        __struct.target_system = buf.get_u8()?;
12873        __struct.target_component = buf.get_u8()?;
12874        __struct.gimbal_device_id = buf.get_u8()?;
12875        Ok(__struct)
12876    }
12877    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12878        let mut __tmp = BytesMut::new(bytes);
12879        #[allow(clippy::absurd_extreme_comparisons)]
12880        #[allow(unused_comparisons)]
12881        if __tmp.remaining() < Self::ENCODED_LEN {
12882            panic!(
12883                "buffer is too small (need {} bytes, but got {})",
12884                Self::ENCODED_LEN,
12885                __tmp.remaining(),
12886            )
12887        }
12888        __tmp.put_u32_le(self.flags.bits() as u32);
12889        for val in &self.q {
12890            __tmp.put_f32_le(*val);
12891        }
12892        __tmp.put_f32_le(self.angular_velocity_x);
12893        __tmp.put_f32_le(self.angular_velocity_y);
12894        __tmp.put_f32_le(self.angular_velocity_z);
12895        __tmp.put_u8(self.target_system);
12896        __tmp.put_u8(self.target_component);
12897        __tmp.put_u8(self.gimbal_device_id);
12898        if matches!(version, MavlinkVersion::V2) {
12899            let len = __tmp.len();
12900            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12901        } else {
12902            __tmp.len()
12903        }
12904    }
12905}
12906#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12907#[doc = ""]
12908#[doc = "ID: 288"]
12909#[derive(Debug, Clone, PartialEq)]
12910#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12911#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12912#[cfg_attr(feature = "ts", derive(TS))]
12913#[cfg_attr(feature = "ts", ts(export))]
12914pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12915    #[doc = "High level gimbal manager flags."]
12916    pub flags: GimbalManagerFlags,
12917    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12918    pub pitch: f32,
12919    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12920    pub yaw: f32,
12921    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12922    pub pitch_rate: f32,
12923    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12924    pub yaw_rate: f32,
12925    #[doc = "System ID"]
12926    pub target_system: u8,
12927    #[doc = "Component ID"]
12928    pub target_component: u8,
12929    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12930    pub gimbal_device_id: u8,
12931}
12932impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12933    pub const ENCODED_LEN: usize = 23usize;
12934    pub const DEFAULT: Self = Self {
12935        flags: GimbalManagerFlags::DEFAULT,
12936        pitch: 0.0_f32,
12937        yaw: 0.0_f32,
12938        pitch_rate: 0.0_f32,
12939        yaw_rate: 0.0_f32,
12940        target_system: 0_u8,
12941        target_component: 0_u8,
12942        gimbal_device_id: 0_u8,
12943    };
12944    #[cfg(feature = "arbitrary")]
12945    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12946        use arbitrary::{Arbitrary, Unstructured};
12947        let mut buf = [0u8; 1024];
12948        rng.fill_bytes(&mut buf);
12949        let mut unstructured = Unstructured::new(&buf);
12950        Self::arbitrary(&mut unstructured).unwrap_or_default()
12951    }
12952}
12953impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12954    fn default() -> Self {
12955        Self::DEFAULT.clone()
12956    }
12957}
12958impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12959    type Message = MavMessage;
12960    const ID: u32 = 288u32;
12961    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
12962    const EXTRA_CRC: u8 = 20u8;
12963    const ENCODED_LEN: usize = 23usize;
12964    fn deser(
12965        _version: MavlinkVersion,
12966        __input: &[u8],
12967    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12968        let avail_len = __input.len();
12969        let mut payload_buf = [0; Self::ENCODED_LEN];
12970        let mut buf = if avail_len < Self::ENCODED_LEN {
12971            payload_buf[0..avail_len].copy_from_slice(__input);
12972            Bytes::new(&payload_buf)
12973        } else {
12974            Bytes::new(__input)
12975        };
12976        let mut __struct = Self::default();
12977        let tmp = buf.get_u32_le()?;
12978        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
12979            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12980                flag_type: "GimbalManagerFlags",
12981                value: tmp as u64,
12982            })?;
12983        __struct.pitch = buf.get_f32_le()?;
12984        __struct.yaw = buf.get_f32_le()?;
12985        __struct.pitch_rate = buf.get_f32_le()?;
12986        __struct.yaw_rate = buf.get_f32_le()?;
12987        __struct.target_system = buf.get_u8()?;
12988        __struct.target_component = buf.get_u8()?;
12989        __struct.gimbal_device_id = buf.get_u8()?;
12990        Ok(__struct)
12991    }
12992    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12993        let mut __tmp = BytesMut::new(bytes);
12994        #[allow(clippy::absurd_extreme_comparisons)]
12995        #[allow(unused_comparisons)]
12996        if __tmp.remaining() < Self::ENCODED_LEN {
12997            panic!(
12998                "buffer is too small (need {} bytes, but got {})",
12999                Self::ENCODED_LEN,
13000                __tmp.remaining(),
13001            )
13002        }
13003        __tmp.put_u32_le(self.flags.bits() as u32);
13004        __tmp.put_f32_le(self.pitch);
13005        __tmp.put_f32_le(self.yaw);
13006        __tmp.put_f32_le(self.pitch_rate);
13007        __tmp.put_f32_le(self.yaw_rate);
13008        __tmp.put_u8(self.target_system);
13009        __tmp.put_u8(self.target_component);
13010        __tmp.put_u8(self.gimbal_device_id);
13011        if matches!(version, MavlinkVersion::V2) {
13012            let len = __tmp.len();
13013            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13014        } else {
13015            __tmp.len()
13016        }
13017    }
13018}
13019#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13020#[doc = ""]
13021#[doc = "ID: 287"]
13022#[derive(Debug, Clone, PartialEq)]
13023#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13024#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13025#[cfg_attr(feature = "ts", derive(TS))]
13026#[cfg_attr(feature = "ts", ts(export))]
13027pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13028    #[doc = "High level gimbal manager flags to use."]
13029    pub flags: GimbalManagerFlags,
13030    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13031    pub pitch: f32,
13032    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13033    pub yaw: f32,
13034    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13035    pub pitch_rate: f32,
13036    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13037    pub yaw_rate: f32,
13038    #[doc = "System ID"]
13039    pub target_system: u8,
13040    #[doc = "Component ID"]
13041    pub target_component: u8,
13042    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13043    pub gimbal_device_id: u8,
13044}
13045impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13046    pub const ENCODED_LEN: usize = 23usize;
13047    pub const DEFAULT: Self = Self {
13048        flags: GimbalManagerFlags::DEFAULT,
13049        pitch: 0.0_f32,
13050        yaw: 0.0_f32,
13051        pitch_rate: 0.0_f32,
13052        yaw_rate: 0.0_f32,
13053        target_system: 0_u8,
13054        target_component: 0_u8,
13055        gimbal_device_id: 0_u8,
13056    };
13057    #[cfg(feature = "arbitrary")]
13058    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13059        use arbitrary::{Arbitrary, Unstructured};
13060        let mut buf = [0u8; 1024];
13061        rng.fill_bytes(&mut buf);
13062        let mut unstructured = Unstructured::new(&buf);
13063        Self::arbitrary(&mut unstructured).unwrap_or_default()
13064    }
13065}
13066impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13067    fn default() -> Self {
13068        Self::DEFAULT.clone()
13069    }
13070}
13071impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13072    type Message = MavMessage;
13073    const ID: u32 = 287u32;
13074    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13075    const EXTRA_CRC: u8 = 1u8;
13076    const ENCODED_LEN: usize = 23usize;
13077    fn deser(
13078        _version: MavlinkVersion,
13079        __input: &[u8],
13080    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13081        let avail_len = __input.len();
13082        let mut payload_buf = [0; Self::ENCODED_LEN];
13083        let mut buf = if avail_len < Self::ENCODED_LEN {
13084            payload_buf[0..avail_len].copy_from_slice(__input);
13085            Bytes::new(&payload_buf)
13086        } else {
13087            Bytes::new(__input)
13088        };
13089        let mut __struct = Self::default();
13090        let tmp = buf.get_u32_le()?;
13091        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13092            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13093                flag_type: "GimbalManagerFlags",
13094                value: tmp as u64,
13095            })?;
13096        __struct.pitch = buf.get_f32_le()?;
13097        __struct.yaw = buf.get_f32_le()?;
13098        __struct.pitch_rate = buf.get_f32_le()?;
13099        __struct.yaw_rate = buf.get_f32_le()?;
13100        __struct.target_system = buf.get_u8()?;
13101        __struct.target_component = buf.get_u8()?;
13102        __struct.gimbal_device_id = buf.get_u8()?;
13103        Ok(__struct)
13104    }
13105    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13106        let mut __tmp = BytesMut::new(bytes);
13107        #[allow(clippy::absurd_extreme_comparisons)]
13108        #[allow(unused_comparisons)]
13109        if __tmp.remaining() < Self::ENCODED_LEN {
13110            panic!(
13111                "buffer is too small (need {} bytes, but got {})",
13112                Self::ENCODED_LEN,
13113                __tmp.remaining(),
13114            )
13115        }
13116        __tmp.put_u32_le(self.flags.bits() as u32);
13117        __tmp.put_f32_le(self.pitch);
13118        __tmp.put_f32_le(self.yaw);
13119        __tmp.put_f32_le(self.pitch_rate);
13120        __tmp.put_f32_le(self.yaw_rate);
13121        __tmp.put_u8(self.target_system);
13122        __tmp.put_u8(self.target_component);
13123        __tmp.put_u8(self.gimbal_device_id);
13124        if matches!(version, MavlinkVersion::V2) {
13125            let len = __tmp.len();
13126            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13127        } else {
13128            __tmp.len()
13129        }
13130    }
13131}
13132#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13133#[doc = ""]
13134#[doc = "ID: 281"]
13135#[derive(Debug, Clone, PartialEq)]
13136#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13137#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13138#[cfg_attr(feature = "ts", derive(TS))]
13139#[cfg_attr(feature = "ts", ts(export))]
13140pub struct GIMBAL_MANAGER_STATUS_DATA {
13141    #[doc = "Timestamp (time since system boot)."]
13142    pub time_boot_ms: u32,
13143    #[doc = "High level gimbal manager flags currently applied."]
13144    pub flags: GimbalManagerFlags,
13145    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13146    pub gimbal_device_id: u8,
13147    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13148    pub primary_control_sysid: u8,
13149    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13150    pub primary_control_compid: u8,
13151    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13152    pub secondary_control_sysid: u8,
13153    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13154    pub secondary_control_compid: u8,
13155}
13156impl GIMBAL_MANAGER_STATUS_DATA {
13157    pub const ENCODED_LEN: usize = 13usize;
13158    pub const DEFAULT: Self = Self {
13159        time_boot_ms: 0_u32,
13160        flags: GimbalManagerFlags::DEFAULT,
13161        gimbal_device_id: 0_u8,
13162        primary_control_sysid: 0_u8,
13163        primary_control_compid: 0_u8,
13164        secondary_control_sysid: 0_u8,
13165        secondary_control_compid: 0_u8,
13166    };
13167    #[cfg(feature = "arbitrary")]
13168    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13169        use arbitrary::{Arbitrary, Unstructured};
13170        let mut buf = [0u8; 1024];
13171        rng.fill_bytes(&mut buf);
13172        let mut unstructured = Unstructured::new(&buf);
13173        Self::arbitrary(&mut unstructured).unwrap_or_default()
13174    }
13175}
13176impl Default for GIMBAL_MANAGER_STATUS_DATA {
13177    fn default() -> Self {
13178        Self::DEFAULT.clone()
13179    }
13180}
13181impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13182    type Message = MavMessage;
13183    const ID: u32 = 281u32;
13184    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13185    const EXTRA_CRC: u8 = 48u8;
13186    const ENCODED_LEN: usize = 13usize;
13187    fn deser(
13188        _version: MavlinkVersion,
13189        __input: &[u8],
13190    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13191        let avail_len = __input.len();
13192        let mut payload_buf = [0; Self::ENCODED_LEN];
13193        let mut buf = if avail_len < Self::ENCODED_LEN {
13194            payload_buf[0..avail_len].copy_from_slice(__input);
13195            Bytes::new(&payload_buf)
13196        } else {
13197            Bytes::new(__input)
13198        };
13199        let mut __struct = Self::default();
13200        __struct.time_boot_ms = buf.get_u32_le()?;
13201        let tmp = buf.get_u32_le()?;
13202        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13203            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13204                flag_type: "GimbalManagerFlags",
13205                value: tmp as u64,
13206            })?;
13207        __struct.gimbal_device_id = buf.get_u8()?;
13208        __struct.primary_control_sysid = buf.get_u8()?;
13209        __struct.primary_control_compid = buf.get_u8()?;
13210        __struct.secondary_control_sysid = buf.get_u8()?;
13211        __struct.secondary_control_compid = buf.get_u8()?;
13212        Ok(__struct)
13213    }
13214    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13215        let mut __tmp = BytesMut::new(bytes);
13216        #[allow(clippy::absurd_extreme_comparisons)]
13217        #[allow(unused_comparisons)]
13218        if __tmp.remaining() < Self::ENCODED_LEN {
13219            panic!(
13220                "buffer is too small (need {} bytes, but got {})",
13221                Self::ENCODED_LEN,
13222                __tmp.remaining(),
13223            )
13224        }
13225        __tmp.put_u32_le(self.time_boot_ms);
13226        __tmp.put_u32_le(self.flags.bits() as u32);
13227        __tmp.put_u8(self.gimbal_device_id);
13228        __tmp.put_u8(self.primary_control_sysid);
13229        __tmp.put_u8(self.primary_control_compid);
13230        __tmp.put_u8(self.secondary_control_sysid);
13231        __tmp.put_u8(self.secondary_control_compid);
13232        if matches!(version, MavlinkVersion::V2) {
13233            let len = __tmp.len();
13234            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13235        } else {
13236            __tmp.len()
13237        }
13238    }
13239}
13240#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13241#[doc = ""]
13242#[doc = "ID: 33"]
13243#[derive(Debug, Clone, PartialEq)]
13244#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13245#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13246#[cfg_attr(feature = "ts", derive(TS))]
13247#[cfg_attr(feature = "ts", ts(export))]
13248pub struct GLOBAL_POSITION_INT_DATA {
13249    #[doc = "Timestamp (time since system boot)."]
13250    pub time_boot_ms: u32,
13251    #[doc = "Latitude, expressed"]
13252    pub lat: i32,
13253    #[doc = "Longitude, expressed"]
13254    pub lon: i32,
13255    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13256    pub alt: i32,
13257    #[doc = "Altitude above home"]
13258    pub relative_alt: i32,
13259    #[doc = "Ground X Speed (Latitude, positive north)"]
13260    pub vx: i16,
13261    #[doc = "Ground Y Speed (Longitude, positive east)"]
13262    pub vy: i16,
13263    #[doc = "Ground Z Speed (Altitude, positive down)"]
13264    pub vz: i16,
13265    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13266    pub hdg: u16,
13267}
13268impl GLOBAL_POSITION_INT_DATA {
13269    pub const ENCODED_LEN: usize = 28usize;
13270    pub const DEFAULT: Self = Self {
13271        time_boot_ms: 0_u32,
13272        lat: 0_i32,
13273        lon: 0_i32,
13274        alt: 0_i32,
13275        relative_alt: 0_i32,
13276        vx: 0_i16,
13277        vy: 0_i16,
13278        vz: 0_i16,
13279        hdg: 0_u16,
13280    };
13281    #[cfg(feature = "arbitrary")]
13282    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13283        use arbitrary::{Arbitrary, Unstructured};
13284        let mut buf = [0u8; 1024];
13285        rng.fill_bytes(&mut buf);
13286        let mut unstructured = Unstructured::new(&buf);
13287        Self::arbitrary(&mut unstructured).unwrap_or_default()
13288    }
13289}
13290impl Default for GLOBAL_POSITION_INT_DATA {
13291    fn default() -> Self {
13292        Self::DEFAULT.clone()
13293    }
13294}
13295impl MessageData for GLOBAL_POSITION_INT_DATA {
13296    type Message = MavMessage;
13297    const ID: u32 = 33u32;
13298    const NAME: &'static str = "GLOBAL_POSITION_INT";
13299    const EXTRA_CRC: u8 = 104u8;
13300    const ENCODED_LEN: usize = 28usize;
13301    fn deser(
13302        _version: MavlinkVersion,
13303        __input: &[u8],
13304    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13305        let avail_len = __input.len();
13306        let mut payload_buf = [0; Self::ENCODED_LEN];
13307        let mut buf = if avail_len < Self::ENCODED_LEN {
13308            payload_buf[0..avail_len].copy_from_slice(__input);
13309            Bytes::new(&payload_buf)
13310        } else {
13311            Bytes::new(__input)
13312        };
13313        let mut __struct = Self::default();
13314        __struct.time_boot_ms = buf.get_u32_le()?;
13315        __struct.lat = buf.get_i32_le()?;
13316        __struct.lon = buf.get_i32_le()?;
13317        __struct.alt = buf.get_i32_le()?;
13318        __struct.relative_alt = buf.get_i32_le()?;
13319        __struct.vx = buf.get_i16_le()?;
13320        __struct.vy = buf.get_i16_le()?;
13321        __struct.vz = buf.get_i16_le()?;
13322        __struct.hdg = buf.get_u16_le()?;
13323        Ok(__struct)
13324    }
13325    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13326        let mut __tmp = BytesMut::new(bytes);
13327        #[allow(clippy::absurd_extreme_comparisons)]
13328        #[allow(unused_comparisons)]
13329        if __tmp.remaining() < Self::ENCODED_LEN {
13330            panic!(
13331                "buffer is too small (need {} bytes, but got {})",
13332                Self::ENCODED_LEN,
13333                __tmp.remaining(),
13334            )
13335        }
13336        __tmp.put_u32_le(self.time_boot_ms);
13337        __tmp.put_i32_le(self.lat);
13338        __tmp.put_i32_le(self.lon);
13339        __tmp.put_i32_le(self.alt);
13340        __tmp.put_i32_le(self.relative_alt);
13341        __tmp.put_i16_le(self.vx);
13342        __tmp.put_i16_le(self.vy);
13343        __tmp.put_i16_le(self.vz);
13344        __tmp.put_u16_le(self.hdg);
13345        if matches!(version, MavlinkVersion::V2) {
13346            let len = __tmp.len();
13347            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13348        } else {
13349            __tmp.len()
13350        }
13351    }
13352}
13353#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13354#[doc = ""]
13355#[doc = "ID: 63"]
13356#[derive(Debug, Clone, PartialEq)]
13357#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13358#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13359#[cfg_attr(feature = "ts", derive(TS))]
13360#[cfg_attr(feature = "ts", ts(export))]
13361pub struct GLOBAL_POSITION_INT_COV_DATA {
13362    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13363    pub time_usec: u64,
13364    #[doc = "Latitude"]
13365    pub lat: i32,
13366    #[doc = "Longitude"]
13367    pub lon: i32,
13368    #[doc = "Altitude in meters above MSL"]
13369    pub alt: i32,
13370    #[doc = "Altitude above ground"]
13371    pub relative_alt: i32,
13372    #[doc = "Ground X Speed (Latitude)"]
13373    pub vx: f32,
13374    #[doc = "Ground Y Speed (Longitude)"]
13375    pub vy: f32,
13376    #[doc = "Ground Z Speed (Altitude)"]
13377    pub vz: f32,
13378    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13379    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13380    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13381    pub covariance: [f32; 36],
13382    #[doc = "Class id of the estimator this estimate originated from."]
13383    pub estimator_type: MavEstimatorType,
13384}
13385impl GLOBAL_POSITION_INT_COV_DATA {
13386    pub const ENCODED_LEN: usize = 181usize;
13387    pub const DEFAULT: Self = Self {
13388        time_usec: 0_u64,
13389        lat: 0_i32,
13390        lon: 0_i32,
13391        alt: 0_i32,
13392        relative_alt: 0_i32,
13393        vx: 0.0_f32,
13394        vy: 0.0_f32,
13395        vz: 0.0_f32,
13396        covariance: [0.0_f32; 36usize],
13397        estimator_type: MavEstimatorType::DEFAULT,
13398    };
13399    #[cfg(feature = "arbitrary")]
13400    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13401        use arbitrary::{Arbitrary, Unstructured};
13402        let mut buf = [0u8; 1024];
13403        rng.fill_bytes(&mut buf);
13404        let mut unstructured = Unstructured::new(&buf);
13405        Self::arbitrary(&mut unstructured).unwrap_or_default()
13406    }
13407}
13408impl Default for GLOBAL_POSITION_INT_COV_DATA {
13409    fn default() -> Self {
13410        Self::DEFAULT.clone()
13411    }
13412}
13413impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
13414    type Message = MavMessage;
13415    const ID: u32 = 63u32;
13416    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
13417    const EXTRA_CRC: u8 = 119u8;
13418    const ENCODED_LEN: usize = 181usize;
13419    fn deser(
13420        _version: MavlinkVersion,
13421        __input: &[u8],
13422    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13423        let avail_len = __input.len();
13424        let mut payload_buf = [0; Self::ENCODED_LEN];
13425        let mut buf = if avail_len < Self::ENCODED_LEN {
13426            payload_buf[0..avail_len].copy_from_slice(__input);
13427            Bytes::new(&payload_buf)
13428        } else {
13429            Bytes::new(__input)
13430        };
13431        let mut __struct = Self::default();
13432        __struct.time_usec = buf.get_u64_le()?;
13433        __struct.lat = buf.get_i32_le()?;
13434        __struct.lon = buf.get_i32_le()?;
13435        __struct.alt = buf.get_i32_le()?;
13436        __struct.relative_alt = buf.get_i32_le()?;
13437        __struct.vx = buf.get_f32_le()?;
13438        __struct.vy = buf.get_f32_le()?;
13439        __struct.vz = buf.get_f32_le()?;
13440        for v in &mut __struct.covariance {
13441            let val = buf.get_f32_le()?;
13442            *v = val;
13443        }
13444        let tmp = buf.get_u8()?;
13445        __struct.estimator_type =
13446            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13447                enum_type: "MavEstimatorType",
13448                value: tmp as u64,
13449            })?;
13450        Ok(__struct)
13451    }
13452    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13453        let mut __tmp = BytesMut::new(bytes);
13454        #[allow(clippy::absurd_extreme_comparisons)]
13455        #[allow(unused_comparisons)]
13456        if __tmp.remaining() < Self::ENCODED_LEN {
13457            panic!(
13458                "buffer is too small (need {} bytes, but got {})",
13459                Self::ENCODED_LEN,
13460                __tmp.remaining(),
13461            )
13462        }
13463        __tmp.put_u64_le(self.time_usec);
13464        __tmp.put_i32_le(self.lat);
13465        __tmp.put_i32_le(self.lon);
13466        __tmp.put_i32_le(self.alt);
13467        __tmp.put_i32_le(self.relative_alt);
13468        __tmp.put_f32_le(self.vx);
13469        __tmp.put_f32_le(self.vy);
13470        __tmp.put_f32_le(self.vz);
13471        for val in &self.covariance {
13472            __tmp.put_f32_le(*val);
13473        }
13474        __tmp.put_u8(self.estimator_type as u8);
13475        if matches!(version, MavlinkVersion::V2) {
13476            let len = __tmp.len();
13477            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13478        } else {
13479            __tmp.len()
13480        }
13481    }
13482}
13483#[doc = "Global position/attitude estimate from a vision source."]
13484#[doc = ""]
13485#[doc = "ID: 101"]
13486#[derive(Debug, Clone, PartialEq)]
13487#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13488#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13489#[cfg_attr(feature = "ts", derive(TS))]
13490#[cfg_attr(feature = "ts", ts(export))]
13491pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13492    #[doc = "Timestamp (UNIX time or since system boot)"]
13493    pub usec: u64,
13494    #[doc = "Global X position"]
13495    pub x: f32,
13496    #[doc = "Global Y position"]
13497    pub y: f32,
13498    #[doc = "Global Z position"]
13499    pub z: f32,
13500    #[doc = "Roll angle"]
13501    pub roll: f32,
13502    #[doc = "Pitch angle"]
13503    pub pitch: f32,
13504    #[doc = "Yaw angle"]
13505    pub yaw: f32,
13506    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
13507    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13508    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13509    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13510    pub covariance: [f32; 21],
13511    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
13512    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13513    pub reset_counter: u8,
13514}
13515impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13516    pub const ENCODED_LEN: usize = 117usize;
13517    pub const DEFAULT: Self = Self {
13518        usec: 0_u64,
13519        x: 0.0_f32,
13520        y: 0.0_f32,
13521        z: 0.0_f32,
13522        roll: 0.0_f32,
13523        pitch: 0.0_f32,
13524        yaw: 0.0_f32,
13525        covariance: [0.0_f32; 21usize],
13526        reset_counter: 0_u8,
13527    };
13528    #[cfg(feature = "arbitrary")]
13529    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13530        use arbitrary::{Arbitrary, Unstructured};
13531        let mut buf = [0u8; 1024];
13532        rng.fill_bytes(&mut buf);
13533        let mut unstructured = Unstructured::new(&buf);
13534        Self::arbitrary(&mut unstructured).unwrap_or_default()
13535    }
13536}
13537impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13538    fn default() -> Self {
13539        Self::DEFAULT.clone()
13540    }
13541}
13542impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13543    type Message = MavMessage;
13544    const ID: u32 = 101u32;
13545    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
13546    const EXTRA_CRC: u8 = 102u8;
13547    const ENCODED_LEN: usize = 117usize;
13548    fn deser(
13549        _version: MavlinkVersion,
13550        __input: &[u8],
13551    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13552        let avail_len = __input.len();
13553        let mut payload_buf = [0; Self::ENCODED_LEN];
13554        let mut buf = if avail_len < Self::ENCODED_LEN {
13555            payload_buf[0..avail_len].copy_from_slice(__input);
13556            Bytes::new(&payload_buf)
13557        } else {
13558            Bytes::new(__input)
13559        };
13560        let mut __struct = Self::default();
13561        __struct.usec = buf.get_u64_le()?;
13562        __struct.x = buf.get_f32_le()?;
13563        __struct.y = buf.get_f32_le()?;
13564        __struct.z = buf.get_f32_le()?;
13565        __struct.roll = buf.get_f32_le()?;
13566        __struct.pitch = buf.get_f32_le()?;
13567        __struct.yaw = buf.get_f32_le()?;
13568        for v in &mut __struct.covariance {
13569            let val = buf.get_f32_le()?;
13570            *v = val;
13571        }
13572        __struct.reset_counter = buf.get_u8()?;
13573        Ok(__struct)
13574    }
13575    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13576        let mut __tmp = BytesMut::new(bytes);
13577        #[allow(clippy::absurd_extreme_comparisons)]
13578        #[allow(unused_comparisons)]
13579        if __tmp.remaining() < Self::ENCODED_LEN {
13580            panic!(
13581                "buffer is too small (need {} bytes, but got {})",
13582                Self::ENCODED_LEN,
13583                __tmp.remaining(),
13584            )
13585        }
13586        __tmp.put_u64_le(self.usec);
13587        __tmp.put_f32_le(self.x);
13588        __tmp.put_f32_le(self.y);
13589        __tmp.put_f32_le(self.z);
13590        __tmp.put_f32_le(self.roll);
13591        __tmp.put_f32_le(self.pitch);
13592        __tmp.put_f32_le(self.yaw);
13593        if matches!(version, MavlinkVersion::V2) {
13594            for val in &self.covariance {
13595                __tmp.put_f32_le(*val);
13596            }
13597            __tmp.put_u8(self.reset_counter);
13598            let len = __tmp.len();
13599            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13600        } else {
13601            __tmp.len()
13602        }
13603    }
13604}
13605#[doc = "Second GPS data."]
13606#[doc = ""]
13607#[doc = "ID: 124"]
13608#[derive(Debug, Clone, PartialEq)]
13609#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13611#[cfg_attr(feature = "ts", derive(TS))]
13612#[cfg_attr(feature = "ts", ts(export))]
13613pub struct GPS2_RAW_DATA {
13614    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13615    pub time_usec: u64,
13616    #[doc = "Latitude (WGS84)"]
13617    pub lat: i32,
13618    #[doc = "Longitude (WGS84)"]
13619    pub lon: i32,
13620    #[doc = "Altitude (MSL). Positive for up."]
13621    pub alt: i32,
13622    #[doc = "Age of DGPS info"]
13623    pub dgps_age: u32,
13624    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13625    pub eph: u16,
13626    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13627    pub epv: u16,
13628    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
13629    pub vel: u16,
13630    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13631    pub cog: u16,
13632    #[doc = "GPS fix type."]
13633    pub fix_type: GpsFixType,
13634    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
13635    pub satellites_visible: u8,
13636    #[doc = "Number of DGPS satellites"]
13637    pub dgps_numch: u8,
13638    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
13639    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13640    pub yaw: u16,
13641    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
13642    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13643    pub alt_ellipsoid: i32,
13644    #[doc = "Position uncertainty."]
13645    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13646    pub h_acc: u32,
13647    #[doc = "Altitude uncertainty."]
13648    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13649    pub v_acc: u32,
13650    #[doc = "Speed uncertainty."]
13651    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13652    pub vel_acc: u32,
13653    #[doc = "Heading / track uncertainty"]
13654    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13655    pub hdg_acc: u32,
13656}
13657impl GPS2_RAW_DATA {
13658    pub const ENCODED_LEN: usize = 57usize;
13659    pub const DEFAULT: Self = Self {
13660        time_usec: 0_u64,
13661        lat: 0_i32,
13662        lon: 0_i32,
13663        alt: 0_i32,
13664        dgps_age: 0_u32,
13665        eph: 0_u16,
13666        epv: 0_u16,
13667        vel: 0_u16,
13668        cog: 0_u16,
13669        fix_type: GpsFixType::DEFAULT,
13670        satellites_visible: 0_u8,
13671        dgps_numch: 0_u8,
13672        yaw: 0_u16,
13673        alt_ellipsoid: 0_i32,
13674        h_acc: 0_u32,
13675        v_acc: 0_u32,
13676        vel_acc: 0_u32,
13677        hdg_acc: 0_u32,
13678    };
13679    #[cfg(feature = "arbitrary")]
13680    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13681        use arbitrary::{Arbitrary, Unstructured};
13682        let mut buf = [0u8; 1024];
13683        rng.fill_bytes(&mut buf);
13684        let mut unstructured = Unstructured::new(&buf);
13685        Self::arbitrary(&mut unstructured).unwrap_or_default()
13686    }
13687}
13688impl Default for GPS2_RAW_DATA {
13689    fn default() -> Self {
13690        Self::DEFAULT.clone()
13691    }
13692}
13693impl MessageData for GPS2_RAW_DATA {
13694    type Message = MavMessage;
13695    const ID: u32 = 124u32;
13696    const NAME: &'static str = "GPS2_RAW";
13697    const EXTRA_CRC: u8 = 87u8;
13698    const ENCODED_LEN: usize = 57usize;
13699    fn deser(
13700        _version: MavlinkVersion,
13701        __input: &[u8],
13702    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13703        let avail_len = __input.len();
13704        let mut payload_buf = [0; Self::ENCODED_LEN];
13705        let mut buf = if avail_len < Self::ENCODED_LEN {
13706            payload_buf[0..avail_len].copy_from_slice(__input);
13707            Bytes::new(&payload_buf)
13708        } else {
13709            Bytes::new(__input)
13710        };
13711        let mut __struct = Self::default();
13712        __struct.time_usec = buf.get_u64_le()?;
13713        __struct.lat = buf.get_i32_le()?;
13714        __struct.lon = buf.get_i32_le()?;
13715        __struct.alt = buf.get_i32_le()?;
13716        __struct.dgps_age = buf.get_u32_le()?;
13717        __struct.eph = buf.get_u16_le()?;
13718        __struct.epv = buf.get_u16_le()?;
13719        __struct.vel = buf.get_u16_le()?;
13720        __struct.cog = buf.get_u16_le()?;
13721        let tmp = buf.get_u8()?;
13722        __struct.fix_type =
13723            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13724                enum_type: "GpsFixType",
13725                value: tmp as u64,
13726            })?;
13727        __struct.satellites_visible = buf.get_u8()?;
13728        __struct.dgps_numch = buf.get_u8()?;
13729        __struct.yaw = buf.get_u16_le()?;
13730        __struct.alt_ellipsoid = buf.get_i32_le()?;
13731        __struct.h_acc = buf.get_u32_le()?;
13732        __struct.v_acc = buf.get_u32_le()?;
13733        __struct.vel_acc = buf.get_u32_le()?;
13734        __struct.hdg_acc = buf.get_u32_le()?;
13735        Ok(__struct)
13736    }
13737    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13738        let mut __tmp = BytesMut::new(bytes);
13739        #[allow(clippy::absurd_extreme_comparisons)]
13740        #[allow(unused_comparisons)]
13741        if __tmp.remaining() < Self::ENCODED_LEN {
13742            panic!(
13743                "buffer is too small (need {} bytes, but got {})",
13744                Self::ENCODED_LEN,
13745                __tmp.remaining(),
13746            )
13747        }
13748        __tmp.put_u64_le(self.time_usec);
13749        __tmp.put_i32_le(self.lat);
13750        __tmp.put_i32_le(self.lon);
13751        __tmp.put_i32_le(self.alt);
13752        __tmp.put_u32_le(self.dgps_age);
13753        __tmp.put_u16_le(self.eph);
13754        __tmp.put_u16_le(self.epv);
13755        __tmp.put_u16_le(self.vel);
13756        __tmp.put_u16_le(self.cog);
13757        __tmp.put_u8(self.fix_type as u8);
13758        __tmp.put_u8(self.satellites_visible);
13759        __tmp.put_u8(self.dgps_numch);
13760        if matches!(version, MavlinkVersion::V2) {
13761            __tmp.put_u16_le(self.yaw);
13762            __tmp.put_i32_le(self.alt_ellipsoid);
13763            __tmp.put_u32_le(self.h_acc);
13764            __tmp.put_u32_le(self.v_acc);
13765            __tmp.put_u32_le(self.vel_acc);
13766            __tmp.put_u32_le(self.hdg_acc);
13767            let len = __tmp.len();
13768            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13769        } else {
13770            __tmp.len()
13771        }
13772    }
13773}
13774#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
13775#[doc = ""]
13776#[doc = "ID: 128"]
13777#[derive(Debug, Clone, PartialEq)]
13778#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13780#[cfg_attr(feature = "ts", derive(TS))]
13781#[cfg_attr(feature = "ts", ts(export))]
13782pub struct GPS2_RTK_DATA {
13783    #[doc = "Time since boot of last baseline message received."]
13784    pub time_last_baseline_ms: u32,
13785    #[doc = "GPS Time of Week of last baseline"]
13786    pub tow: u32,
13787    #[doc = "Current baseline in ECEF x or NED north component."]
13788    pub baseline_a_mm: i32,
13789    #[doc = "Current baseline in ECEF y or NED east component."]
13790    pub baseline_b_mm: i32,
13791    #[doc = "Current baseline in ECEF z or NED down component."]
13792    pub baseline_c_mm: i32,
13793    #[doc = "Current estimate of baseline accuracy."]
13794    pub accuracy: u32,
13795    #[doc = "Current number of integer ambiguity hypotheses."]
13796    pub iar_num_hypotheses: i32,
13797    #[doc = "GPS Week Number of last baseline"]
13798    pub wn: u16,
13799    #[doc = "Identification of connected RTK receiver."]
13800    pub rtk_receiver_id: u8,
13801    #[doc = "GPS-specific health report for RTK data."]
13802    pub rtk_health: u8,
13803    #[doc = "Rate of baseline messages being received by GPS"]
13804    pub rtk_rate: u8,
13805    #[doc = "Current number of sats used for RTK calculation."]
13806    pub nsats: u8,
13807    #[doc = "Coordinate system of baseline"]
13808    pub baseline_coords_type: RtkBaselineCoordinateSystem,
13809}
13810impl GPS2_RTK_DATA {
13811    pub const ENCODED_LEN: usize = 35usize;
13812    pub const DEFAULT: Self = Self {
13813        time_last_baseline_ms: 0_u32,
13814        tow: 0_u32,
13815        baseline_a_mm: 0_i32,
13816        baseline_b_mm: 0_i32,
13817        baseline_c_mm: 0_i32,
13818        accuracy: 0_u32,
13819        iar_num_hypotheses: 0_i32,
13820        wn: 0_u16,
13821        rtk_receiver_id: 0_u8,
13822        rtk_health: 0_u8,
13823        rtk_rate: 0_u8,
13824        nsats: 0_u8,
13825        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
13826    };
13827    #[cfg(feature = "arbitrary")]
13828    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13829        use arbitrary::{Arbitrary, Unstructured};
13830        let mut buf = [0u8; 1024];
13831        rng.fill_bytes(&mut buf);
13832        let mut unstructured = Unstructured::new(&buf);
13833        Self::arbitrary(&mut unstructured).unwrap_or_default()
13834    }
13835}
13836impl Default for GPS2_RTK_DATA {
13837    fn default() -> Self {
13838        Self::DEFAULT.clone()
13839    }
13840}
13841impl MessageData for GPS2_RTK_DATA {
13842    type Message = MavMessage;
13843    const ID: u32 = 128u32;
13844    const NAME: &'static str = "GPS2_RTK";
13845    const EXTRA_CRC: u8 = 226u8;
13846    const ENCODED_LEN: usize = 35usize;
13847    fn deser(
13848        _version: MavlinkVersion,
13849        __input: &[u8],
13850    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13851        let avail_len = __input.len();
13852        let mut payload_buf = [0; Self::ENCODED_LEN];
13853        let mut buf = if avail_len < Self::ENCODED_LEN {
13854            payload_buf[0..avail_len].copy_from_slice(__input);
13855            Bytes::new(&payload_buf)
13856        } else {
13857            Bytes::new(__input)
13858        };
13859        let mut __struct = Self::default();
13860        __struct.time_last_baseline_ms = buf.get_u32_le()?;
13861        __struct.tow = buf.get_u32_le()?;
13862        __struct.baseline_a_mm = buf.get_i32_le()?;
13863        __struct.baseline_b_mm = buf.get_i32_le()?;
13864        __struct.baseline_c_mm = buf.get_i32_le()?;
13865        __struct.accuracy = buf.get_u32_le()?;
13866        __struct.iar_num_hypotheses = buf.get_i32_le()?;
13867        __struct.wn = buf.get_u16_le()?;
13868        __struct.rtk_receiver_id = buf.get_u8()?;
13869        __struct.rtk_health = buf.get_u8()?;
13870        __struct.rtk_rate = buf.get_u8()?;
13871        __struct.nsats = buf.get_u8()?;
13872        let tmp = buf.get_u8()?;
13873        __struct.baseline_coords_type =
13874            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13875                enum_type: "RtkBaselineCoordinateSystem",
13876                value: tmp as u64,
13877            })?;
13878        Ok(__struct)
13879    }
13880    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13881        let mut __tmp = BytesMut::new(bytes);
13882        #[allow(clippy::absurd_extreme_comparisons)]
13883        #[allow(unused_comparisons)]
13884        if __tmp.remaining() < Self::ENCODED_LEN {
13885            panic!(
13886                "buffer is too small (need {} bytes, but got {})",
13887                Self::ENCODED_LEN,
13888                __tmp.remaining(),
13889            )
13890        }
13891        __tmp.put_u32_le(self.time_last_baseline_ms);
13892        __tmp.put_u32_le(self.tow);
13893        __tmp.put_i32_le(self.baseline_a_mm);
13894        __tmp.put_i32_le(self.baseline_b_mm);
13895        __tmp.put_i32_le(self.baseline_c_mm);
13896        __tmp.put_u32_le(self.accuracy);
13897        __tmp.put_i32_le(self.iar_num_hypotheses);
13898        __tmp.put_u16_le(self.wn);
13899        __tmp.put_u8(self.rtk_receiver_id);
13900        __tmp.put_u8(self.rtk_health);
13901        __tmp.put_u8(self.rtk_rate);
13902        __tmp.put_u8(self.nsats);
13903        __tmp.put_u8(self.baseline_coords_type as u8);
13904        if matches!(version, MavlinkVersion::V2) {
13905            let len = __tmp.len();
13906            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13907        } else {
13908            __tmp.len()
13909        }
13910    }
13911}
13912#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
13913#[doc = ""]
13914#[doc = "ID: 49"]
13915#[derive(Debug, Clone, PartialEq)]
13916#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13917#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13918#[cfg_attr(feature = "ts", derive(TS))]
13919#[cfg_attr(feature = "ts", ts(export))]
13920pub struct GPS_GLOBAL_ORIGIN_DATA {
13921    #[doc = "Latitude (WGS84)"]
13922    pub latitude: i32,
13923    #[doc = "Longitude (WGS84)"]
13924    pub longitude: i32,
13925    #[doc = "Altitude (MSL). Positive for up."]
13926    pub altitude: i32,
13927    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13928    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13929    pub time_usec: u64,
13930}
13931impl GPS_GLOBAL_ORIGIN_DATA {
13932    pub const ENCODED_LEN: usize = 20usize;
13933    pub const DEFAULT: Self = Self {
13934        latitude: 0_i32,
13935        longitude: 0_i32,
13936        altitude: 0_i32,
13937        time_usec: 0_u64,
13938    };
13939    #[cfg(feature = "arbitrary")]
13940    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13941        use arbitrary::{Arbitrary, Unstructured};
13942        let mut buf = [0u8; 1024];
13943        rng.fill_bytes(&mut buf);
13944        let mut unstructured = Unstructured::new(&buf);
13945        Self::arbitrary(&mut unstructured).unwrap_or_default()
13946    }
13947}
13948impl Default for GPS_GLOBAL_ORIGIN_DATA {
13949    fn default() -> Self {
13950        Self::DEFAULT.clone()
13951    }
13952}
13953impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
13954    type Message = MavMessage;
13955    const ID: u32 = 49u32;
13956    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
13957    const EXTRA_CRC: u8 = 39u8;
13958    const ENCODED_LEN: usize = 20usize;
13959    fn deser(
13960        _version: MavlinkVersion,
13961        __input: &[u8],
13962    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13963        let avail_len = __input.len();
13964        let mut payload_buf = [0; Self::ENCODED_LEN];
13965        let mut buf = if avail_len < Self::ENCODED_LEN {
13966            payload_buf[0..avail_len].copy_from_slice(__input);
13967            Bytes::new(&payload_buf)
13968        } else {
13969            Bytes::new(__input)
13970        };
13971        let mut __struct = Self::default();
13972        __struct.latitude = buf.get_i32_le()?;
13973        __struct.longitude = buf.get_i32_le()?;
13974        __struct.altitude = buf.get_i32_le()?;
13975        __struct.time_usec = buf.get_u64_le()?;
13976        Ok(__struct)
13977    }
13978    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13979        let mut __tmp = BytesMut::new(bytes);
13980        #[allow(clippy::absurd_extreme_comparisons)]
13981        #[allow(unused_comparisons)]
13982        if __tmp.remaining() < Self::ENCODED_LEN {
13983            panic!(
13984                "buffer is too small (need {} bytes, but got {})",
13985                Self::ENCODED_LEN,
13986                __tmp.remaining(),
13987            )
13988        }
13989        __tmp.put_i32_le(self.latitude);
13990        __tmp.put_i32_le(self.longitude);
13991        __tmp.put_i32_le(self.altitude);
13992        if matches!(version, MavlinkVersion::V2) {
13993            __tmp.put_u64_le(self.time_usec);
13994            let len = __tmp.len();
13995            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13996        } else {
13997            __tmp.len()
13998        }
13999    }
14000}
14001#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14002#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14003#[doc = ""]
14004#[doc = "ID: 123"]
14005#[derive(Debug, Clone, PartialEq)]
14006#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14007#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14008#[cfg_attr(feature = "ts", derive(TS))]
14009#[cfg_attr(feature = "ts", ts(export))]
14010pub struct GPS_INJECT_DATA_DATA {
14011    #[doc = "System ID"]
14012    pub target_system: u8,
14013    #[doc = "Component ID"]
14014    pub target_component: u8,
14015    #[doc = "Data length"]
14016    pub len: u8,
14017    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14018    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14019    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14020    pub data: [u8; 110],
14021}
14022impl GPS_INJECT_DATA_DATA {
14023    pub const ENCODED_LEN: usize = 113usize;
14024    pub const DEFAULT: Self = Self {
14025        target_system: 0_u8,
14026        target_component: 0_u8,
14027        len: 0_u8,
14028        data: [0_u8; 110usize],
14029    };
14030    #[cfg(feature = "arbitrary")]
14031    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14032        use arbitrary::{Arbitrary, Unstructured};
14033        let mut buf = [0u8; 1024];
14034        rng.fill_bytes(&mut buf);
14035        let mut unstructured = Unstructured::new(&buf);
14036        Self::arbitrary(&mut unstructured).unwrap_or_default()
14037    }
14038}
14039impl Default for GPS_INJECT_DATA_DATA {
14040    fn default() -> Self {
14041        Self::DEFAULT.clone()
14042    }
14043}
14044impl MessageData for GPS_INJECT_DATA_DATA {
14045    type Message = MavMessage;
14046    const ID: u32 = 123u32;
14047    const NAME: &'static str = "GPS_INJECT_DATA";
14048    const EXTRA_CRC: u8 = 250u8;
14049    const ENCODED_LEN: usize = 113usize;
14050    fn deser(
14051        _version: MavlinkVersion,
14052        __input: &[u8],
14053    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14054        let avail_len = __input.len();
14055        let mut payload_buf = [0; Self::ENCODED_LEN];
14056        let mut buf = if avail_len < Self::ENCODED_LEN {
14057            payload_buf[0..avail_len].copy_from_slice(__input);
14058            Bytes::new(&payload_buf)
14059        } else {
14060            Bytes::new(__input)
14061        };
14062        let mut __struct = Self::default();
14063        __struct.target_system = buf.get_u8()?;
14064        __struct.target_component = buf.get_u8()?;
14065        __struct.len = buf.get_u8()?;
14066        for v in &mut __struct.data {
14067            let val = buf.get_u8()?;
14068            *v = val;
14069        }
14070        Ok(__struct)
14071    }
14072    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14073        let mut __tmp = BytesMut::new(bytes);
14074        #[allow(clippy::absurd_extreme_comparisons)]
14075        #[allow(unused_comparisons)]
14076        if __tmp.remaining() < Self::ENCODED_LEN {
14077            panic!(
14078                "buffer is too small (need {} bytes, but got {})",
14079                Self::ENCODED_LEN,
14080                __tmp.remaining(),
14081            )
14082        }
14083        __tmp.put_u8(self.target_system);
14084        __tmp.put_u8(self.target_component);
14085        __tmp.put_u8(self.len);
14086        for val in &self.data {
14087            __tmp.put_u8(*val);
14088        }
14089        if matches!(version, MavlinkVersion::V2) {
14090            let len = __tmp.len();
14091            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14092        } else {
14093            __tmp.len()
14094        }
14095    }
14096}
14097#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14098#[doc = ""]
14099#[doc = "ID: 232"]
14100#[derive(Debug, Clone, PartialEq)]
14101#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14102#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14103#[cfg_attr(feature = "ts", derive(TS))]
14104#[cfg_attr(feature = "ts", ts(export))]
14105pub struct GPS_INPUT_DATA {
14106    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14107    pub time_usec: u64,
14108    #[doc = "GPS time (from start of GPS week)"]
14109    pub time_week_ms: u32,
14110    #[doc = "Latitude (WGS84)"]
14111    pub lat: i32,
14112    #[doc = "Longitude (WGS84)"]
14113    pub lon: i32,
14114    #[doc = "Altitude (MSL). Positive for up."]
14115    pub alt: f32,
14116    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14117    pub hdop: f32,
14118    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14119    pub vdop: f32,
14120    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14121    pub vn: f32,
14122    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14123    pub ve: f32,
14124    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14125    pub vd: f32,
14126    #[doc = "GPS speed accuracy"]
14127    pub speed_accuracy: f32,
14128    #[doc = "GPS horizontal accuracy"]
14129    pub horiz_accuracy: f32,
14130    #[doc = "GPS vertical accuracy"]
14131    pub vert_accuracy: f32,
14132    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14133    pub ignore_flags: GpsInputIgnoreFlags,
14134    #[doc = "GPS week number"]
14135    pub time_week: u16,
14136    #[doc = "ID of the GPS for multiple GPS inputs"]
14137    pub gps_id: u8,
14138    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14139    pub fix_type: u8,
14140    #[doc = "Number of satellites visible."]
14141    pub satellites_visible: u8,
14142    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14143    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14144    pub yaw: u16,
14145}
14146impl GPS_INPUT_DATA {
14147    pub const ENCODED_LEN: usize = 65usize;
14148    pub const DEFAULT: Self = Self {
14149        time_usec: 0_u64,
14150        time_week_ms: 0_u32,
14151        lat: 0_i32,
14152        lon: 0_i32,
14153        alt: 0.0_f32,
14154        hdop: 0.0_f32,
14155        vdop: 0.0_f32,
14156        vn: 0.0_f32,
14157        ve: 0.0_f32,
14158        vd: 0.0_f32,
14159        speed_accuracy: 0.0_f32,
14160        horiz_accuracy: 0.0_f32,
14161        vert_accuracy: 0.0_f32,
14162        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14163        time_week: 0_u16,
14164        gps_id: 0_u8,
14165        fix_type: 0_u8,
14166        satellites_visible: 0_u8,
14167        yaw: 0_u16,
14168    };
14169    #[cfg(feature = "arbitrary")]
14170    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14171        use arbitrary::{Arbitrary, Unstructured};
14172        let mut buf = [0u8; 1024];
14173        rng.fill_bytes(&mut buf);
14174        let mut unstructured = Unstructured::new(&buf);
14175        Self::arbitrary(&mut unstructured).unwrap_or_default()
14176    }
14177}
14178impl Default for GPS_INPUT_DATA {
14179    fn default() -> Self {
14180        Self::DEFAULT.clone()
14181    }
14182}
14183impl MessageData for GPS_INPUT_DATA {
14184    type Message = MavMessage;
14185    const ID: u32 = 232u32;
14186    const NAME: &'static str = "GPS_INPUT";
14187    const EXTRA_CRC: u8 = 151u8;
14188    const ENCODED_LEN: usize = 65usize;
14189    fn deser(
14190        _version: MavlinkVersion,
14191        __input: &[u8],
14192    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14193        let avail_len = __input.len();
14194        let mut payload_buf = [0; Self::ENCODED_LEN];
14195        let mut buf = if avail_len < Self::ENCODED_LEN {
14196            payload_buf[0..avail_len].copy_from_slice(__input);
14197            Bytes::new(&payload_buf)
14198        } else {
14199            Bytes::new(__input)
14200        };
14201        let mut __struct = Self::default();
14202        __struct.time_usec = buf.get_u64_le()?;
14203        __struct.time_week_ms = buf.get_u32_le()?;
14204        __struct.lat = buf.get_i32_le()?;
14205        __struct.lon = buf.get_i32_le()?;
14206        __struct.alt = buf.get_f32_le()?;
14207        __struct.hdop = buf.get_f32_le()?;
14208        __struct.vdop = buf.get_f32_le()?;
14209        __struct.vn = buf.get_f32_le()?;
14210        __struct.ve = buf.get_f32_le()?;
14211        __struct.vd = buf.get_f32_le()?;
14212        __struct.speed_accuracy = buf.get_f32_le()?;
14213        __struct.horiz_accuracy = buf.get_f32_le()?;
14214        __struct.vert_accuracy = buf.get_f32_le()?;
14215        let tmp = buf.get_u16_le()?;
14216        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
14217            tmp as <GpsInputIgnoreFlags as Flags>::Bits,
14218        )
14219        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14220            flag_type: "GpsInputIgnoreFlags",
14221            value: tmp as u64,
14222        })?;
14223        __struct.time_week = buf.get_u16_le()?;
14224        __struct.gps_id = buf.get_u8()?;
14225        __struct.fix_type = buf.get_u8()?;
14226        __struct.satellites_visible = buf.get_u8()?;
14227        __struct.yaw = buf.get_u16_le()?;
14228        Ok(__struct)
14229    }
14230    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14231        let mut __tmp = BytesMut::new(bytes);
14232        #[allow(clippy::absurd_extreme_comparisons)]
14233        #[allow(unused_comparisons)]
14234        if __tmp.remaining() < Self::ENCODED_LEN {
14235            panic!(
14236                "buffer is too small (need {} bytes, but got {})",
14237                Self::ENCODED_LEN,
14238                __tmp.remaining(),
14239            )
14240        }
14241        __tmp.put_u64_le(self.time_usec);
14242        __tmp.put_u32_le(self.time_week_ms);
14243        __tmp.put_i32_le(self.lat);
14244        __tmp.put_i32_le(self.lon);
14245        __tmp.put_f32_le(self.alt);
14246        __tmp.put_f32_le(self.hdop);
14247        __tmp.put_f32_le(self.vdop);
14248        __tmp.put_f32_le(self.vn);
14249        __tmp.put_f32_le(self.ve);
14250        __tmp.put_f32_le(self.vd);
14251        __tmp.put_f32_le(self.speed_accuracy);
14252        __tmp.put_f32_le(self.horiz_accuracy);
14253        __tmp.put_f32_le(self.vert_accuracy);
14254        __tmp.put_u16_le(self.ignore_flags.bits() as u16);
14255        __tmp.put_u16_le(self.time_week);
14256        __tmp.put_u8(self.gps_id);
14257        __tmp.put_u8(self.fix_type);
14258        __tmp.put_u8(self.satellites_visible);
14259        if matches!(version, MavlinkVersion::V2) {
14260            __tmp.put_u16_le(self.yaw);
14261            let len = __tmp.len();
14262            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14263        } else {
14264            __tmp.len()
14265        }
14266    }
14267}
14268#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
14269#[doc = ""]
14270#[doc = "ID: 24"]
14271#[derive(Debug, Clone, PartialEq)]
14272#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14274#[cfg_attr(feature = "ts", derive(TS))]
14275#[cfg_attr(feature = "ts", ts(export))]
14276pub struct GPS_RAW_INT_DATA {
14277    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14278    pub time_usec: u64,
14279    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
14280    pub lat: i32,
14281    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
14282    pub lon: i32,
14283    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
14284    pub alt: i32,
14285    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14286    pub eph: u16,
14287    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14288    pub epv: u16,
14289    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14290    pub vel: u16,
14291    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14292    pub cog: u16,
14293    #[doc = "GPS fix type."]
14294    pub fix_type: GpsFixType,
14295    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14296    pub satellites_visible: u8,
14297    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14298    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14299    pub alt_ellipsoid: i32,
14300    #[doc = "Position uncertainty."]
14301    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14302    pub h_acc: u32,
14303    #[doc = "Altitude uncertainty."]
14304    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14305    pub v_acc: u32,
14306    #[doc = "Speed uncertainty."]
14307    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14308    pub vel_acc: u32,
14309    #[doc = "Heading / track uncertainty"]
14310    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14311    pub hdg_acc: u32,
14312    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14313    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14314    pub yaw: u16,
14315}
14316impl GPS_RAW_INT_DATA {
14317    pub const ENCODED_LEN: usize = 52usize;
14318    pub const DEFAULT: Self = Self {
14319        time_usec: 0_u64,
14320        lat: 0_i32,
14321        lon: 0_i32,
14322        alt: 0_i32,
14323        eph: 0_u16,
14324        epv: 0_u16,
14325        vel: 0_u16,
14326        cog: 0_u16,
14327        fix_type: GpsFixType::DEFAULT,
14328        satellites_visible: 0_u8,
14329        alt_ellipsoid: 0_i32,
14330        h_acc: 0_u32,
14331        v_acc: 0_u32,
14332        vel_acc: 0_u32,
14333        hdg_acc: 0_u32,
14334        yaw: 0_u16,
14335    };
14336    #[cfg(feature = "arbitrary")]
14337    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14338        use arbitrary::{Arbitrary, Unstructured};
14339        let mut buf = [0u8; 1024];
14340        rng.fill_bytes(&mut buf);
14341        let mut unstructured = Unstructured::new(&buf);
14342        Self::arbitrary(&mut unstructured).unwrap_or_default()
14343    }
14344}
14345impl Default for GPS_RAW_INT_DATA {
14346    fn default() -> Self {
14347        Self::DEFAULT.clone()
14348    }
14349}
14350impl MessageData for GPS_RAW_INT_DATA {
14351    type Message = MavMessage;
14352    const ID: u32 = 24u32;
14353    const NAME: &'static str = "GPS_RAW_INT";
14354    const EXTRA_CRC: u8 = 24u8;
14355    const ENCODED_LEN: usize = 52usize;
14356    fn deser(
14357        _version: MavlinkVersion,
14358        __input: &[u8],
14359    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14360        let avail_len = __input.len();
14361        let mut payload_buf = [0; Self::ENCODED_LEN];
14362        let mut buf = if avail_len < Self::ENCODED_LEN {
14363            payload_buf[0..avail_len].copy_from_slice(__input);
14364            Bytes::new(&payload_buf)
14365        } else {
14366            Bytes::new(__input)
14367        };
14368        let mut __struct = Self::default();
14369        __struct.time_usec = buf.get_u64_le()?;
14370        __struct.lat = buf.get_i32_le()?;
14371        __struct.lon = buf.get_i32_le()?;
14372        __struct.alt = buf.get_i32_le()?;
14373        __struct.eph = buf.get_u16_le()?;
14374        __struct.epv = buf.get_u16_le()?;
14375        __struct.vel = buf.get_u16_le()?;
14376        __struct.cog = buf.get_u16_le()?;
14377        let tmp = buf.get_u8()?;
14378        __struct.fix_type =
14379            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14380                enum_type: "GpsFixType",
14381                value: tmp as u64,
14382            })?;
14383        __struct.satellites_visible = buf.get_u8()?;
14384        __struct.alt_ellipsoid = buf.get_i32_le()?;
14385        __struct.h_acc = buf.get_u32_le()?;
14386        __struct.v_acc = buf.get_u32_le()?;
14387        __struct.vel_acc = buf.get_u32_le()?;
14388        __struct.hdg_acc = buf.get_u32_le()?;
14389        __struct.yaw = buf.get_u16_le()?;
14390        Ok(__struct)
14391    }
14392    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14393        let mut __tmp = BytesMut::new(bytes);
14394        #[allow(clippy::absurd_extreme_comparisons)]
14395        #[allow(unused_comparisons)]
14396        if __tmp.remaining() < Self::ENCODED_LEN {
14397            panic!(
14398                "buffer is too small (need {} bytes, but got {})",
14399                Self::ENCODED_LEN,
14400                __tmp.remaining(),
14401            )
14402        }
14403        __tmp.put_u64_le(self.time_usec);
14404        __tmp.put_i32_le(self.lat);
14405        __tmp.put_i32_le(self.lon);
14406        __tmp.put_i32_le(self.alt);
14407        __tmp.put_u16_le(self.eph);
14408        __tmp.put_u16_le(self.epv);
14409        __tmp.put_u16_le(self.vel);
14410        __tmp.put_u16_le(self.cog);
14411        __tmp.put_u8(self.fix_type as u8);
14412        __tmp.put_u8(self.satellites_visible);
14413        if matches!(version, MavlinkVersion::V2) {
14414            __tmp.put_i32_le(self.alt_ellipsoid);
14415            __tmp.put_u32_le(self.h_acc);
14416            __tmp.put_u32_le(self.v_acc);
14417            __tmp.put_u32_le(self.vel_acc);
14418            __tmp.put_u32_le(self.hdg_acc);
14419            __tmp.put_u16_le(self.yaw);
14420            let len = __tmp.len();
14421            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14422        } else {
14423            __tmp.len()
14424        }
14425    }
14426}
14427#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
14428#[doc = ""]
14429#[doc = "ID: 233"]
14430#[derive(Debug, Clone, PartialEq)]
14431#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14432#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14433#[cfg_attr(feature = "ts", derive(TS))]
14434#[cfg_attr(feature = "ts", ts(export))]
14435pub struct GPS_RTCM_DATA_DATA {
14436    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
14437    pub flags: u8,
14438    #[doc = "data length"]
14439    pub len: u8,
14440    #[doc = "RTCM message (may be fragmented)"]
14441    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14442    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14443    pub data: [u8; 180],
14444}
14445impl GPS_RTCM_DATA_DATA {
14446    pub const ENCODED_LEN: usize = 182usize;
14447    pub const DEFAULT: Self = Self {
14448        flags: 0_u8,
14449        len: 0_u8,
14450        data: [0_u8; 180usize],
14451    };
14452    #[cfg(feature = "arbitrary")]
14453    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14454        use arbitrary::{Arbitrary, Unstructured};
14455        let mut buf = [0u8; 1024];
14456        rng.fill_bytes(&mut buf);
14457        let mut unstructured = Unstructured::new(&buf);
14458        Self::arbitrary(&mut unstructured).unwrap_or_default()
14459    }
14460}
14461impl Default for GPS_RTCM_DATA_DATA {
14462    fn default() -> Self {
14463        Self::DEFAULT.clone()
14464    }
14465}
14466impl MessageData for GPS_RTCM_DATA_DATA {
14467    type Message = MavMessage;
14468    const ID: u32 = 233u32;
14469    const NAME: &'static str = "GPS_RTCM_DATA";
14470    const EXTRA_CRC: u8 = 35u8;
14471    const ENCODED_LEN: usize = 182usize;
14472    fn deser(
14473        _version: MavlinkVersion,
14474        __input: &[u8],
14475    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14476        let avail_len = __input.len();
14477        let mut payload_buf = [0; Self::ENCODED_LEN];
14478        let mut buf = if avail_len < Self::ENCODED_LEN {
14479            payload_buf[0..avail_len].copy_from_slice(__input);
14480            Bytes::new(&payload_buf)
14481        } else {
14482            Bytes::new(__input)
14483        };
14484        let mut __struct = Self::default();
14485        __struct.flags = buf.get_u8()?;
14486        __struct.len = buf.get_u8()?;
14487        for v in &mut __struct.data {
14488            let val = buf.get_u8()?;
14489            *v = val;
14490        }
14491        Ok(__struct)
14492    }
14493    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14494        let mut __tmp = BytesMut::new(bytes);
14495        #[allow(clippy::absurd_extreme_comparisons)]
14496        #[allow(unused_comparisons)]
14497        if __tmp.remaining() < Self::ENCODED_LEN {
14498            panic!(
14499                "buffer is too small (need {} bytes, but got {})",
14500                Self::ENCODED_LEN,
14501                __tmp.remaining(),
14502            )
14503        }
14504        __tmp.put_u8(self.flags);
14505        __tmp.put_u8(self.len);
14506        for val in &self.data {
14507            __tmp.put_u8(*val);
14508        }
14509        if matches!(version, MavlinkVersion::V2) {
14510            let len = __tmp.len();
14511            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14512        } else {
14513            __tmp.len()
14514        }
14515    }
14516}
14517#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14518#[doc = ""]
14519#[doc = "ID: 127"]
14520#[derive(Debug, Clone, PartialEq)]
14521#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14522#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14523#[cfg_attr(feature = "ts", derive(TS))]
14524#[cfg_attr(feature = "ts", ts(export))]
14525pub struct GPS_RTK_DATA {
14526    #[doc = "Time since boot of last baseline message received."]
14527    pub time_last_baseline_ms: u32,
14528    #[doc = "GPS Time of Week of last baseline"]
14529    pub tow: u32,
14530    #[doc = "Current baseline in ECEF x or NED north component."]
14531    pub baseline_a_mm: i32,
14532    #[doc = "Current baseline in ECEF y or NED east component."]
14533    pub baseline_b_mm: i32,
14534    #[doc = "Current baseline in ECEF z or NED down component."]
14535    pub baseline_c_mm: i32,
14536    #[doc = "Current estimate of baseline accuracy."]
14537    pub accuracy: u32,
14538    #[doc = "Current number of integer ambiguity hypotheses."]
14539    pub iar_num_hypotheses: i32,
14540    #[doc = "GPS Week Number of last baseline"]
14541    pub wn: u16,
14542    #[doc = "Identification of connected RTK receiver."]
14543    pub rtk_receiver_id: u8,
14544    #[doc = "GPS-specific health report for RTK data."]
14545    pub rtk_health: u8,
14546    #[doc = "Rate of baseline messages being received by GPS"]
14547    pub rtk_rate: u8,
14548    #[doc = "Current number of sats used for RTK calculation."]
14549    pub nsats: u8,
14550    #[doc = "Coordinate system of baseline"]
14551    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14552}
14553impl GPS_RTK_DATA {
14554    pub const ENCODED_LEN: usize = 35usize;
14555    pub const DEFAULT: Self = Self {
14556        time_last_baseline_ms: 0_u32,
14557        tow: 0_u32,
14558        baseline_a_mm: 0_i32,
14559        baseline_b_mm: 0_i32,
14560        baseline_c_mm: 0_i32,
14561        accuracy: 0_u32,
14562        iar_num_hypotheses: 0_i32,
14563        wn: 0_u16,
14564        rtk_receiver_id: 0_u8,
14565        rtk_health: 0_u8,
14566        rtk_rate: 0_u8,
14567        nsats: 0_u8,
14568        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14569    };
14570    #[cfg(feature = "arbitrary")]
14571    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14572        use arbitrary::{Arbitrary, Unstructured};
14573        let mut buf = [0u8; 1024];
14574        rng.fill_bytes(&mut buf);
14575        let mut unstructured = Unstructured::new(&buf);
14576        Self::arbitrary(&mut unstructured).unwrap_or_default()
14577    }
14578}
14579impl Default for GPS_RTK_DATA {
14580    fn default() -> Self {
14581        Self::DEFAULT.clone()
14582    }
14583}
14584impl MessageData for GPS_RTK_DATA {
14585    type Message = MavMessage;
14586    const ID: u32 = 127u32;
14587    const NAME: &'static str = "GPS_RTK";
14588    const EXTRA_CRC: u8 = 25u8;
14589    const ENCODED_LEN: usize = 35usize;
14590    fn deser(
14591        _version: MavlinkVersion,
14592        __input: &[u8],
14593    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14594        let avail_len = __input.len();
14595        let mut payload_buf = [0; Self::ENCODED_LEN];
14596        let mut buf = if avail_len < Self::ENCODED_LEN {
14597            payload_buf[0..avail_len].copy_from_slice(__input);
14598            Bytes::new(&payload_buf)
14599        } else {
14600            Bytes::new(__input)
14601        };
14602        let mut __struct = Self::default();
14603        __struct.time_last_baseline_ms = buf.get_u32_le()?;
14604        __struct.tow = buf.get_u32_le()?;
14605        __struct.baseline_a_mm = buf.get_i32_le()?;
14606        __struct.baseline_b_mm = buf.get_i32_le()?;
14607        __struct.baseline_c_mm = buf.get_i32_le()?;
14608        __struct.accuracy = buf.get_u32_le()?;
14609        __struct.iar_num_hypotheses = buf.get_i32_le()?;
14610        __struct.wn = buf.get_u16_le()?;
14611        __struct.rtk_receiver_id = buf.get_u8()?;
14612        __struct.rtk_health = buf.get_u8()?;
14613        __struct.rtk_rate = buf.get_u8()?;
14614        __struct.nsats = buf.get_u8()?;
14615        let tmp = buf.get_u8()?;
14616        __struct.baseline_coords_type =
14617            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14618                enum_type: "RtkBaselineCoordinateSystem",
14619                value: tmp as u64,
14620            })?;
14621        Ok(__struct)
14622    }
14623    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14624        let mut __tmp = BytesMut::new(bytes);
14625        #[allow(clippy::absurd_extreme_comparisons)]
14626        #[allow(unused_comparisons)]
14627        if __tmp.remaining() < Self::ENCODED_LEN {
14628            panic!(
14629                "buffer is too small (need {} bytes, but got {})",
14630                Self::ENCODED_LEN,
14631                __tmp.remaining(),
14632            )
14633        }
14634        __tmp.put_u32_le(self.time_last_baseline_ms);
14635        __tmp.put_u32_le(self.tow);
14636        __tmp.put_i32_le(self.baseline_a_mm);
14637        __tmp.put_i32_le(self.baseline_b_mm);
14638        __tmp.put_i32_le(self.baseline_c_mm);
14639        __tmp.put_u32_le(self.accuracy);
14640        __tmp.put_i32_le(self.iar_num_hypotheses);
14641        __tmp.put_u16_le(self.wn);
14642        __tmp.put_u8(self.rtk_receiver_id);
14643        __tmp.put_u8(self.rtk_health);
14644        __tmp.put_u8(self.rtk_rate);
14645        __tmp.put_u8(self.nsats);
14646        __tmp.put_u8(self.baseline_coords_type as u8);
14647        if matches!(version, MavlinkVersion::V2) {
14648            let len = __tmp.len();
14649            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14650        } else {
14651            __tmp.len()
14652        }
14653    }
14654}
14655#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
14656#[doc = ""]
14657#[doc = "ID: 25"]
14658#[derive(Debug, Clone, PartialEq)]
14659#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14660#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14661#[cfg_attr(feature = "ts", derive(TS))]
14662#[cfg_attr(feature = "ts", ts(export))]
14663pub struct GPS_STATUS_DATA {
14664    #[doc = "Number of satellites visible"]
14665    pub satellites_visible: u8,
14666    #[doc = "Global satellite ID"]
14667    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14668    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14669    pub satellite_prn: [u8; 20],
14670    #[doc = "0: Satellite not used, 1: used for localization"]
14671    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14672    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14673    pub satellite_used: [u8; 20],
14674    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
14675    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14676    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14677    pub satellite_elevation: [u8; 20],
14678    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
14679    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14680    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14681    pub satellite_azimuth: [u8; 20],
14682    #[doc = "Signal to noise ratio of satellite"]
14683    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14684    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14685    pub satellite_snr: [u8; 20],
14686}
14687impl GPS_STATUS_DATA {
14688    pub const ENCODED_LEN: usize = 101usize;
14689    pub const DEFAULT: Self = Self {
14690        satellites_visible: 0_u8,
14691        satellite_prn: [0_u8; 20usize],
14692        satellite_used: [0_u8; 20usize],
14693        satellite_elevation: [0_u8; 20usize],
14694        satellite_azimuth: [0_u8; 20usize],
14695        satellite_snr: [0_u8; 20usize],
14696    };
14697    #[cfg(feature = "arbitrary")]
14698    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14699        use arbitrary::{Arbitrary, Unstructured};
14700        let mut buf = [0u8; 1024];
14701        rng.fill_bytes(&mut buf);
14702        let mut unstructured = Unstructured::new(&buf);
14703        Self::arbitrary(&mut unstructured).unwrap_or_default()
14704    }
14705}
14706impl Default for GPS_STATUS_DATA {
14707    fn default() -> Self {
14708        Self::DEFAULT.clone()
14709    }
14710}
14711impl MessageData for GPS_STATUS_DATA {
14712    type Message = MavMessage;
14713    const ID: u32 = 25u32;
14714    const NAME: &'static str = "GPS_STATUS";
14715    const EXTRA_CRC: u8 = 23u8;
14716    const ENCODED_LEN: usize = 101usize;
14717    fn deser(
14718        _version: MavlinkVersion,
14719        __input: &[u8],
14720    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14721        let avail_len = __input.len();
14722        let mut payload_buf = [0; Self::ENCODED_LEN];
14723        let mut buf = if avail_len < Self::ENCODED_LEN {
14724            payload_buf[0..avail_len].copy_from_slice(__input);
14725            Bytes::new(&payload_buf)
14726        } else {
14727            Bytes::new(__input)
14728        };
14729        let mut __struct = Self::default();
14730        __struct.satellites_visible = buf.get_u8()?;
14731        for v in &mut __struct.satellite_prn {
14732            let val = buf.get_u8()?;
14733            *v = val;
14734        }
14735        for v in &mut __struct.satellite_used {
14736            let val = buf.get_u8()?;
14737            *v = val;
14738        }
14739        for v in &mut __struct.satellite_elevation {
14740            let val = buf.get_u8()?;
14741            *v = val;
14742        }
14743        for v in &mut __struct.satellite_azimuth {
14744            let val = buf.get_u8()?;
14745            *v = val;
14746        }
14747        for v in &mut __struct.satellite_snr {
14748            let val = buf.get_u8()?;
14749            *v = val;
14750        }
14751        Ok(__struct)
14752    }
14753    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14754        let mut __tmp = BytesMut::new(bytes);
14755        #[allow(clippy::absurd_extreme_comparisons)]
14756        #[allow(unused_comparisons)]
14757        if __tmp.remaining() < Self::ENCODED_LEN {
14758            panic!(
14759                "buffer is too small (need {} bytes, but got {})",
14760                Self::ENCODED_LEN,
14761                __tmp.remaining(),
14762            )
14763        }
14764        __tmp.put_u8(self.satellites_visible);
14765        for val in &self.satellite_prn {
14766            __tmp.put_u8(*val);
14767        }
14768        for val in &self.satellite_used {
14769            __tmp.put_u8(*val);
14770        }
14771        for val in &self.satellite_elevation {
14772            __tmp.put_u8(*val);
14773        }
14774        for val in &self.satellite_azimuth {
14775            __tmp.put_u8(*val);
14776        }
14777        for val in &self.satellite_snr {
14778            __tmp.put_u8(*val);
14779        }
14780        if matches!(version, MavlinkVersion::V2) {
14781            let len = __tmp.len();
14782            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14783        } else {
14784            __tmp.len()
14785        }
14786    }
14787}
14788#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
14789#[doc = ""]
14790#[doc = "ID: 0"]
14791#[derive(Debug, Clone, PartialEq)]
14792#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14793#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14794#[cfg_attr(feature = "ts", derive(TS))]
14795#[cfg_attr(feature = "ts", ts(export))]
14796pub struct HEARTBEAT_DATA {
14797    #[doc = "A bitfield for use for autopilot-specific flags"]
14798    pub custom_mode: u32,
14799    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
14800    pub mavtype: MavType,
14801    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
14802    pub autopilot: MavAutopilot,
14803    #[doc = "System mode bitmap."]
14804    pub base_mode: MavModeFlag,
14805    #[doc = "System status flag."]
14806    pub system_status: MavState,
14807    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
14808    pub mavlink_version: u8,
14809}
14810impl HEARTBEAT_DATA {
14811    pub const ENCODED_LEN: usize = 9usize;
14812    pub const DEFAULT: Self = Self {
14813        custom_mode: 0_u32,
14814        mavtype: MavType::DEFAULT,
14815        autopilot: MavAutopilot::DEFAULT,
14816        base_mode: MavModeFlag::DEFAULT,
14817        system_status: MavState::DEFAULT,
14818        mavlink_version: MINOR_MAVLINK_VERSION,
14819    };
14820    #[cfg(feature = "arbitrary")]
14821    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14822        use arbitrary::{Arbitrary, Unstructured};
14823        let mut buf = [0u8; 1024];
14824        rng.fill_bytes(&mut buf);
14825        let mut unstructured = Unstructured::new(&buf);
14826        Self::arbitrary(&mut unstructured).unwrap_or_default()
14827    }
14828}
14829impl Default for HEARTBEAT_DATA {
14830    fn default() -> Self {
14831        Self::DEFAULT.clone()
14832    }
14833}
14834impl MessageData for HEARTBEAT_DATA {
14835    type Message = MavMessage;
14836    const ID: u32 = 0u32;
14837    const NAME: &'static str = "HEARTBEAT";
14838    const EXTRA_CRC: u8 = 50u8;
14839    const ENCODED_LEN: usize = 9usize;
14840    fn deser(
14841        _version: MavlinkVersion,
14842        __input: &[u8],
14843    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14844        let avail_len = __input.len();
14845        let mut payload_buf = [0; Self::ENCODED_LEN];
14846        let mut buf = if avail_len < Self::ENCODED_LEN {
14847            payload_buf[0..avail_len].copy_from_slice(__input);
14848            Bytes::new(&payload_buf)
14849        } else {
14850            Bytes::new(__input)
14851        };
14852        let mut __struct = Self::default();
14853        __struct.custom_mode = buf.get_u32_le()?;
14854        let tmp = buf.get_u8()?;
14855        __struct.mavtype =
14856            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14857                enum_type: "MavType",
14858                value: tmp as u64,
14859            })?;
14860        let tmp = buf.get_u8()?;
14861        __struct.autopilot =
14862            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14863                enum_type: "MavAutopilot",
14864                value: tmp as u64,
14865            })?;
14866        let tmp = buf.get_u8()?;
14867        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
14868            ::mavlink_core::error::ParserError::InvalidFlag {
14869                flag_type: "MavModeFlag",
14870                value: tmp as u64,
14871            },
14872        )?;
14873        let tmp = buf.get_u8()?;
14874        __struct.system_status =
14875            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14876                enum_type: "MavState",
14877                value: tmp as u64,
14878            })?;
14879        __struct.mavlink_version = buf.get_u8()?;
14880        Ok(__struct)
14881    }
14882    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14883        let mut __tmp = BytesMut::new(bytes);
14884        #[allow(clippy::absurd_extreme_comparisons)]
14885        #[allow(unused_comparisons)]
14886        if __tmp.remaining() < Self::ENCODED_LEN {
14887            panic!(
14888                "buffer is too small (need {} bytes, but got {})",
14889                Self::ENCODED_LEN,
14890                __tmp.remaining(),
14891            )
14892        }
14893        __tmp.put_u32_le(self.custom_mode);
14894        __tmp.put_u8(self.mavtype as u8);
14895        __tmp.put_u8(self.autopilot as u8);
14896        __tmp.put_u8(self.base_mode.bits() as u8);
14897        __tmp.put_u8(self.system_status as u8);
14898        __tmp.put_u8(self.mavlink_version);
14899        if matches!(version, MavlinkVersion::V2) {
14900            let len = __tmp.len();
14901            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14902        } else {
14903            __tmp.len()
14904        }
14905    }
14906}
14907#[doc = "The IMU readings in SI units in NED body frame."]
14908#[doc = ""]
14909#[doc = "ID: 105"]
14910#[derive(Debug, Clone, PartialEq)]
14911#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14912#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14913#[cfg_attr(feature = "ts", derive(TS))]
14914#[cfg_attr(feature = "ts", ts(export))]
14915pub struct HIGHRES_IMU_DATA {
14916    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14917    pub time_usec: u64,
14918    #[doc = "X acceleration"]
14919    pub xacc: f32,
14920    #[doc = "Y acceleration"]
14921    pub yacc: f32,
14922    #[doc = "Z acceleration"]
14923    pub zacc: f32,
14924    #[doc = "Angular speed around X axis"]
14925    pub xgyro: f32,
14926    #[doc = "Angular speed around Y axis"]
14927    pub ygyro: f32,
14928    #[doc = "Angular speed around Z axis"]
14929    pub zgyro: f32,
14930    #[doc = "X Magnetic field"]
14931    pub xmag: f32,
14932    #[doc = "Y Magnetic field"]
14933    pub ymag: f32,
14934    #[doc = "Z Magnetic field"]
14935    pub zmag: f32,
14936    #[doc = "Absolute pressure"]
14937    pub abs_pressure: f32,
14938    #[doc = "Differential pressure"]
14939    pub diff_pressure: f32,
14940    #[doc = "Altitude calculated from pressure"]
14941    pub pressure_alt: f32,
14942    #[doc = "Temperature"]
14943    pub temperature: f32,
14944    #[doc = "Bitmap for fields that have updated since last message"]
14945    pub fields_updated: HighresImuUpdatedFlags,
14946    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
14947    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14948    pub id: u8,
14949}
14950impl HIGHRES_IMU_DATA {
14951    pub const ENCODED_LEN: usize = 63usize;
14952    pub const DEFAULT: Self = Self {
14953        time_usec: 0_u64,
14954        xacc: 0.0_f32,
14955        yacc: 0.0_f32,
14956        zacc: 0.0_f32,
14957        xgyro: 0.0_f32,
14958        ygyro: 0.0_f32,
14959        zgyro: 0.0_f32,
14960        xmag: 0.0_f32,
14961        ymag: 0.0_f32,
14962        zmag: 0.0_f32,
14963        abs_pressure: 0.0_f32,
14964        diff_pressure: 0.0_f32,
14965        pressure_alt: 0.0_f32,
14966        temperature: 0.0_f32,
14967        fields_updated: HighresImuUpdatedFlags::DEFAULT,
14968        id: 0_u8,
14969    };
14970    #[cfg(feature = "arbitrary")]
14971    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14972        use arbitrary::{Arbitrary, Unstructured};
14973        let mut buf = [0u8; 1024];
14974        rng.fill_bytes(&mut buf);
14975        let mut unstructured = Unstructured::new(&buf);
14976        Self::arbitrary(&mut unstructured).unwrap_or_default()
14977    }
14978}
14979impl Default for HIGHRES_IMU_DATA {
14980    fn default() -> Self {
14981        Self::DEFAULT.clone()
14982    }
14983}
14984impl MessageData for HIGHRES_IMU_DATA {
14985    type Message = MavMessage;
14986    const ID: u32 = 105u32;
14987    const NAME: &'static str = "HIGHRES_IMU";
14988    const EXTRA_CRC: u8 = 93u8;
14989    const ENCODED_LEN: usize = 63usize;
14990    fn deser(
14991        _version: MavlinkVersion,
14992        __input: &[u8],
14993    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14994        let avail_len = __input.len();
14995        let mut payload_buf = [0; Self::ENCODED_LEN];
14996        let mut buf = if avail_len < Self::ENCODED_LEN {
14997            payload_buf[0..avail_len].copy_from_slice(__input);
14998            Bytes::new(&payload_buf)
14999        } else {
15000            Bytes::new(__input)
15001        };
15002        let mut __struct = Self::default();
15003        __struct.time_usec = buf.get_u64_le()?;
15004        __struct.xacc = buf.get_f32_le()?;
15005        __struct.yacc = buf.get_f32_le()?;
15006        __struct.zacc = buf.get_f32_le()?;
15007        __struct.xgyro = buf.get_f32_le()?;
15008        __struct.ygyro = buf.get_f32_le()?;
15009        __struct.zgyro = buf.get_f32_le()?;
15010        __struct.xmag = buf.get_f32_le()?;
15011        __struct.ymag = buf.get_f32_le()?;
15012        __struct.zmag = buf.get_f32_le()?;
15013        __struct.abs_pressure = buf.get_f32_le()?;
15014        __struct.diff_pressure = buf.get_f32_le()?;
15015        __struct.pressure_alt = buf.get_f32_le()?;
15016        __struct.temperature = buf.get_f32_le()?;
15017        let tmp = buf.get_u16_le()?;
15018        __struct.fields_updated =
15019            HighresImuUpdatedFlags::from_bits(tmp as <HighresImuUpdatedFlags as Flags>::Bits)
15020                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15021                    flag_type: "HighresImuUpdatedFlags",
15022                    value: tmp as u64,
15023                })?;
15024        __struct.id = buf.get_u8()?;
15025        Ok(__struct)
15026    }
15027    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15028        let mut __tmp = BytesMut::new(bytes);
15029        #[allow(clippy::absurd_extreme_comparisons)]
15030        #[allow(unused_comparisons)]
15031        if __tmp.remaining() < Self::ENCODED_LEN {
15032            panic!(
15033                "buffer is too small (need {} bytes, but got {})",
15034                Self::ENCODED_LEN,
15035                __tmp.remaining(),
15036            )
15037        }
15038        __tmp.put_u64_le(self.time_usec);
15039        __tmp.put_f32_le(self.xacc);
15040        __tmp.put_f32_le(self.yacc);
15041        __tmp.put_f32_le(self.zacc);
15042        __tmp.put_f32_le(self.xgyro);
15043        __tmp.put_f32_le(self.ygyro);
15044        __tmp.put_f32_le(self.zgyro);
15045        __tmp.put_f32_le(self.xmag);
15046        __tmp.put_f32_le(self.ymag);
15047        __tmp.put_f32_le(self.zmag);
15048        __tmp.put_f32_le(self.abs_pressure);
15049        __tmp.put_f32_le(self.diff_pressure);
15050        __tmp.put_f32_le(self.pressure_alt);
15051        __tmp.put_f32_le(self.temperature);
15052        __tmp.put_u16_le(self.fields_updated.bits() as u16);
15053        if matches!(version, MavlinkVersion::V2) {
15054            __tmp.put_u8(self.id);
15055            let len = __tmp.len();
15056            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15057        } else {
15058            __tmp.len()
15059        }
15060    }
15061}
15062#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15063#[doc = "Message appropriate for high latency connections like Iridium."]
15064#[doc = ""]
15065#[doc = "ID: 234"]
15066#[derive(Debug, Clone, PartialEq)]
15067#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15068#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15069#[cfg_attr(feature = "ts", derive(TS))]
15070#[cfg_attr(feature = "ts", ts(export))]
15071pub struct HIGH_LATENCY_DATA {
15072    #[doc = "A bitfield for use for autopilot-specific flags."]
15073    pub custom_mode: u32,
15074    #[doc = "Latitude"]
15075    pub latitude: i32,
15076    #[doc = "Longitude"]
15077    pub longitude: i32,
15078    #[doc = "roll"]
15079    pub roll: i16,
15080    #[doc = "pitch"]
15081    pub pitch: i16,
15082    #[doc = "heading"]
15083    pub heading: u16,
15084    #[doc = "heading setpoint"]
15085    pub heading_sp: i16,
15086    #[doc = "Altitude above mean sea level"]
15087    pub altitude_amsl: i16,
15088    #[doc = "Altitude setpoint relative to the home position"]
15089    pub altitude_sp: i16,
15090    #[doc = "distance to target"]
15091    pub wp_distance: u16,
15092    #[doc = "Bitmap of enabled system modes."]
15093    pub base_mode: MavModeFlag,
15094    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
15095    pub landed_state: MavLandedState,
15096    #[doc = "throttle (percentage)"]
15097    pub throttle: i8,
15098    #[doc = "airspeed"]
15099    pub airspeed: u8,
15100    #[doc = "airspeed setpoint"]
15101    pub airspeed_sp: u8,
15102    #[doc = "groundspeed"]
15103    pub groundspeed: u8,
15104    #[doc = "climb rate"]
15105    pub climb_rate: i8,
15106    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15107    pub gps_nsat: u8,
15108    #[doc = "GPS Fix type."]
15109    pub gps_fix_type: GpsFixType,
15110    #[doc = "Remaining battery (percentage)"]
15111    pub battery_remaining: u8,
15112    #[doc = "Autopilot temperature (degrees C)"]
15113    pub temperature: i8,
15114    #[doc = "Air temperature (degrees C) from airspeed sensor"]
15115    pub temperature_air: i8,
15116    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
15117    pub failsafe: u8,
15118    #[doc = "current waypoint number"]
15119    pub wp_num: u8,
15120}
15121impl HIGH_LATENCY_DATA {
15122    pub const ENCODED_LEN: usize = 40usize;
15123    pub const DEFAULT: Self = Self {
15124        custom_mode: 0_u32,
15125        latitude: 0_i32,
15126        longitude: 0_i32,
15127        roll: 0_i16,
15128        pitch: 0_i16,
15129        heading: 0_u16,
15130        heading_sp: 0_i16,
15131        altitude_amsl: 0_i16,
15132        altitude_sp: 0_i16,
15133        wp_distance: 0_u16,
15134        base_mode: MavModeFlag::DEFAULT,
15135        landed_state: MavLandedState::DEFAULT,
15136        throttle: 0_i8,
15137        airspeed: 0_u8,
15138        airspeed_sp: 0_u8,
15139        groundspeed: 0_u8,
15140        climb_rate: 0_i8,
15141        gps_nsat: 0_u8,
15142        gps_fix_type: GpsFixType::DEFAULT,
15143        battery_remaining: 0_u8,
15144        temperature: 0_i8,
15145        temperature_air: 0_i8,
15146        failsafe: 0_u8,
15147        wp_num: 0_u8,
15148    };
15149    #[cfg(feature = "arbitrary")]
15150    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15151        use arbitrary::{Arbitrary, Unstructured};
15152        let mut buf = [0u8; 1024];
15153        rng.fill_bytes(&mut buf);
15154        let mut unstructured = Unstructured::new(&buf);
15155        Self::arbitrary(&mut unstructured).unwrap_or_default()
15156    }
15157}
15158impl Default for HIGH_LATENCY_DATA {
15159    fn default() -> Self {
15160        Self::DEFAULT.clone()
15161    }
15162}
15163impl MessageData for HIGH_LATENCY_DATA {
15164    type Message = MavMessage;
15165    const ID: u32 = 234u32;
15166    const NAME: &'static str = "HIGH_LATENCY";
15167    const EXTRA_CRC: u8 = 150u8;
15168    const ENCODED_LEN: usize = 40usize;
15169    fn deser(
15170        _version: MavlinkVersion,
15171        __input: &[u8],
15172    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15173        let avail_len = __input.len();
15174        let mut payload_buf = [0; Self::ENCODED_LEN];
15175        let mut buf = if avail_len < Self::ENCODED_LEN {
15176            payload_buf[0..avail_len].copy_from_slice(__input);
15177            Bytes::new(&payload_buf)
15178        } else {
15179            Bytes::new(__input)
15180        };
15181        let mut __struct = Self::default();
15182        __struct.custom_mode = buf.get_u32_le()?;
15183        __struct.latitude = buf.get_i32_le()?;
15184        __struct.longitude = buf.get_i32_le()?;
15185        __struct.roll = buf.get_i16_le()?;
15186        __struct.pitch = buf.get_i16_le()?;
15187        __struct.heading = buf.get_u16_le()?;
15188        __struct.heading_sp = buf.get_i16_le()?;
15189        __struct.altitude_amsl = buf.get_i16_le()?;
15190        __struct.altitude_sp = buf.get_i16_le()?;
15191        __struct.wp_distance = buf.get_u16_le()?;
15192        let tmp = buf.get_u8()?;
15193        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
15194            ::mavlink_core::error::ParserError::InvalidFlag {
15195                flag_type: "MavModeFlag",
15196                value: tmp as u64,
15197            },
15198        )?;
15199        let tmp = buf.get_u8()?;
15200        __struct.landed_state =
15201            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15202                enum_type: "MavLandedState",
15203                value: tmp as u64,
15204            })?;
15205        __struct.throttle = buf.get_i8()?;
15206        __struct.airspeed = buf.get_u8()?;
15207        __struct.airspeed_sp = buf.get_u8()?;
15208        __struct.groundspeed = buf.get_u8()?;
15209        __struct.climb_rate = buf.get_i8()?;
15210        __struct.gps_nsat = buf.get_u8()?;
15211        let tmp = buf.get_u8()?;
15212        __struct.gps_fix_type =
15213            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15214                enum_type: "GpsFixType",
15215                value: tmp as u64,
15216            })?;
15217        __struct.battery_remaining = buf.get_u8()?;
15218        __struct.temperature = buf.get_i8()?;
15219        __struct.temperature_air = buf.get_i8()?;
15220        __struct.failsafe = buf.get_u8()?;
15221        __struct.wp_num = buf.get_u8()?;
15222        Ok(__struct)
15223    }
15224    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15225        let mut __tmp = BytesMut::new(bytes);
15226        #[allow(clippy::absurd_extreme_comparisons)]
15227        #[allow(unused_comparisons)]
15228        if __tmp.remaining() < Self::ENCODED_LEN {
15229            panic!(
15230                "buffer is too small (need {} bytes, but got {})",
15231                Self::ENCODED_LEN,
15232                __tmp.remaining(),
15233            )
15234        }
15235        __tmp.put_u32_le(self.custom_mode);
15236        __tmp.put_i32_le(self.latitude);
15237        __tmp.put_i32_le(self.longitude);
15238        __tmp.put_i16_le(self.roll);
15239        __tmp.put_i16_le(self.pitch);
15240        __tmp.put_u16_le(self.heading);
15241        __tmp.put_i16_le(self.heading_sp);
15242        __tmp.put_i16_le(self.altitude_amsl);
15243        __tmp.put_i16_le(self.altitude_sp);
15244        __tmp.put_u16_le(self.wp_distance);
15245        __tmp.put_u8(self.base_mode.bits() as u8);
15246        __tmp.put_u8(self.landed_state as u8);
15247        __tmp.put_i8(self.throttle);
15248        __tmp.put_u8(self.airspeed);
15249        __tmp.put_u8(self.airspeed_sp);
15250        __tmp.put_u8(self.groundspeed);
15251        __tmp.put_i8(self.climb_rate);
15252        __tmp.put_u8(self.gps_nsat);
15253        __tmp.put_u8(self.gps_fix_type as u8);
15254        __tmp.put_u8(self.battery_remaining);
15255        __tmp.put_i8(self.temperature);
15256        __tmp.put_i8(self.temperature_air);
15257        __tmp.put_u8(self.failsafe);
15258        __tmp.put_u8(self.wp_num);
15259        if matches!(version, MavlinkVersion::V2) {
15260            let len = __tmp.len();
15261            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15262        } else {
15263            __tmp.len()
15264        }
15265    }
15266}
15267#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
15268#[doc = ""]
15269#[doc = "ID: 235"]
15270#[derive(Debug, Clone, PartialEq)]
15271#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15272#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15273#[cfg_attr(feature = "ts", derive(TS))]
15274#[cfg_attr(feature = "ts", ts(export))]
15275pub struct HIGH_LATENCY2_DATA {
15276    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
15277    pub timestamp: u32,
15278    #[doc = "Latitude"]
15279    pub latitude: i32,
15280    #[doc = "Longitude"]
15281    pub longitude: i32,
15282    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
15283    pub custom_mode: u16,
15284    #[doc = "Altitude above mean sea level"]
15285    pub altitude: i16,
15286    #[doc = "Altitude setpoint"]
15287    pub target_altitude: i16,
15288    #[doc = "Distance to target waypoint or position"]
15289    pub target_distance: u16,
15290    #[doc = "Current waypoint number"]
15291    pub wp_num: u16,
15292    #[doc = "Bitmap of failure flags."]
15293    pub failure_flags: HlFailureFlag,
15294    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
15295    pub mavtype: MavType,
15296    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15297    pub autopilot: MavAutopilot,
15298    #[doc = "Heading"]
15299    pub heading: u8,
15300    #[doc = "Heading setpoint"]
15301    pub target_heading: u8,
15302    #[doc = "Throttle"]
15303    pub throttle: u8,
15304    #[doc = "Airspeed"]
15305    pub airspeed: u8,
15306    #[doc = "Airspeed setpoint"]
15307    pub airspeed_sp: u8,
15308    #[doc = "Groundspeed"]
15309    pub groundspeed: u8,
15310    #[doc = "Windspeed"]
15311    pub windspeed: u8,
15312    #[doc = "Wind heading"]
15313    pub wind_heading: u8,
15314    #[doc = "Maximum error horizontal position since last message"]
15315    pub eph: u8,
15316    #[doc = "Maximum error vertical position since last message"]
15317    pub epv: u8,
15318    #[doc = "Air temperature"]
15319    pub temperature_air: i8,
15320    #[doc = "Maximum climb rate magnitude since last message"]
15321    pub climb_rate: i8,
15322    #[doc = "Battery level (-1 if field not provided)."]
15323    pub battery: i8,
15324    #[doc = "Field for custom payload."]
15325    pub custom0: i8,
15326    #[doc = "Field for custom payload."]
15327    pub custom1: i8,
15328    #[doc = "Field for custom payload."]
15329    pub custom2: i8,
15330}
15331impl HIGH_LATENCY2_DATA {
15332    pub const ENCODED_LEN: usize = 42usize;
15333    pub const DEFAULT: Self = Self {
15334        timestamp: 0_u32,
15335        latitude: 0_i32,
15336        longitude: 0_i32,
15337        custom_mode: 0_u16,
15338        altitude: 0_i16,
15339        target_altitude: 0_i16,
15340        target_distance: 0_u16,
15341        wp_num: 0_u16,
15342        failure_flags: HlFailureFlag::DEFAULT,
15343        mavtype: MavType::DEFAULT,
15344        autopilot: MavAutopilot::DEFAULT,
15345        heading: 0_u8,
15346        target_heading: 0_u8,
15347        throttle: 0_u8,
15348        airspeed: 0_u8,
15349        airspeed_sp: 0_u8,
15350        groundspeed: 0_u8,
15351        windspeed: 0_u8,
15352        wind_heading: 0_u8,
15353        eph: 0_u8,
15354        epv: 0_u8,
15355        temperature_air: 0_i8,
15356        climb_rate: 0_i8,
15357        battery: 0_i8,
15358        custom0: 0_i8,
15359        custom1: 0_i8,
15360        custom2: 0_i8,
15361    };
15362    #[cfg(feature = "arbitrary")]
15363    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15364        use arbitrary::{Arbitrary, Unstructured};
15365        let mut buf = [0u8; 1024];
15366        rng.fill_bytes(&mut buf);
15367        let mut unstructured = Unstructured::new(&buf);
15368        Self::arbitrary(&mut unstructured).unwrap_or_default()
15369    }
15370}
15371impl Default for HIGH_LATENCY2_DATA {
15372    fn default() -> Self {
15373        Self::DEFAULT.clone()
15374    }
15375}
15376impl MessageData for HIGH_LATENCY2_DATA {
15377    type Message = MavMessage;
15378    const ID: u32 = 235u32;
15379    const NAME: &'static str = "HIGH_LATENCY2";
15380    const EXTRA_CRC: u8 = 179u8;
15381    const ENCODED_LEN: usize = 42usize;
15382    fn deser(
15383        _version: MavlinkVersion,
15384        __input: &[u8],
15385    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15386        let avail_len = __input.len();
15387        let mut payload_buf = [0; Self::ENCODED_LEN];
15388        let mut buf = if avail_len < Self::ENCODED_LEN {
15389            payload_buf[0..avail_len].copy_from_slice(__input);
15390            Bytes::new(&payload_buf)
15391        } else {
15392            Bytes::new(__input)
15393        };
15394        let mut __struct = Self::default();
15395        __struct.timestamp = buf.get_u32_le()?;
15396        __struct.latitude = buf.get_i32_le()?;
15397        __struct.longitude = buf.get_i32_le()?;
15398        __struct.custom_mode = buf.get_u16_le()?;
15399        __struct.altitude = buf.get_i16_le()?;
15400        __struct.target_altitude = buf.get_i16_le()?;
15401        __struct.target_distance = buf.get_u16_le()?;
15402        __struct.wp_num = buf.get_u16_le()?;
15403        let tmp = buf.get_u16_le()?;
15404        __struct.failure_flags = HlFailureFlag::from_bits(tmp as <HlFailureFlag as Flags>::Bits)
15405            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15406                flag_type: "HlFailureFlag",
15407                value: tmp as u64,
15408            })?;
15409        let tmp = buf.get_u8()?;
15410        __struct.mavtype =
15411            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15412                enum_type: "MavType",
15413                value: tmp as u64,
15414            })?;
15415        let tmp = buf.get_u8()?;
15416        __struct.autopilot =
15417            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15418                enum_type: "MavAutopilot",
15419                value: tmp as u64,
15420            })?;
15421        __struct.heading = buf.get_u8()?;
15422        __struct.target_heading = buf.get_u8()?;
15423        __struct.throttle = buf.get_u8()?;
15424        __struct.airspeed = buf.get_u8()?;
15425        __struct.airspeed_sp = buf.get_u8()?;
15426        __struct.groundspeed = buf.get_u8()?;
15427        __struct.windspeed = buf.get_u8()?;
15428        __struct.wind_heading = buf.get_u8()?;
15429        __struct.eph = buf.get_u8()?;
15430        __struct.epv = buf.get_u8()?;
15431        __struct.temperature_air = buf.get_i8()?;
15432        __struct.climb_rate = buf.get_i8()?;
15433        __struct.battery = buf.get_i8()?;
15434        __struct.custom0 = buf.get_i8()?;
15435        __struct.custom1 = buf.get_i8()?;
15436        __struct.custom2 = buf.get_i8()?;
15437        Ok(__struct)
15438    }
15439    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15440        let mut __tmp = BytesMut::new(bytes);
15441        #[allow(clippy::absurd_extreme_comparisons)]
15442        #[allow(unused_comparisons)]
15443        if __tmp.remaining() < Self::ENCODED_LEN {
15444            panic!(
15445                "buffer is too small (need {} bytes, but got {})",
15446                Self::ENCODED_LEN,
15447                __tmp.remaining(),
15448            )
15449        }
15450        __tmp.put_u32_le(self.timestamp);
15451        __tmp.put_i32_le(self.latitude);
15452        __tmp.put_i32_le(self.longitude);
15453        __tmp.put_u16_le(self.custom_mode);
15454        __tmp.put_i16_le(self.altitude);
15455        __tmp.put_i16_le(self.target_altitude);
15456        __tmp.put_u16_le(self.target_distance);
15457        __tmp.put_u16_le(self.wp_num);
15458        __tmp.put_u16_le(self.failure_flags.bits() as u16);
15459        __tmp.put_u8(self.mavtype as u8);
15460        __tmp.put_u8(self.autopilot as u8);
15461        __tmp.put_u8(self.heading);
15462        __tmp.put_u8(self.target_heading);
15463        __tmp.put_u8(self.throttle);
15464        __tmp.put_u8(self.airspeed);
15465        __tmp.put_u8(self.airspeed_sp);
15466        __tmp.put_u8(self.groundspeed);
15467        __tmp.put_u8(self.windspeed);
15468        __tmp.put_u8(self.wind_heading);
15469        __tmp.put_u8(self.eph);
15470        __tmp.put_u8(self.epv);
15471        __tmp.put_i8(self.temperature_air);
15472        __tmp.put_i8(self.climb_rate);
15473        __tmp.put_i8(self.battery);
15474        __tmp.put_i8(self.custom0);
15475        __tmp.put_i8(self.custom1);
15476        __tmp.put_i8(self.custom2);
15477        if matches!(version, MavlinkVersion::V2) {
15478            let len = __tmp.len();
15479            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15480        } else {
15481            __tmp.len()
15482        }
15483    }
15484}
15485#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
15486#[doc = ""]
15487#[doc = "ID: 93"]
15488#[derive(Debug, Clone, PartialEq)]
15489#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15490#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15491#[cfg_attr(feature = "ts", derive(TS))]
15492#[cfg_attr(feature = "ts", ts(export))]
15493pub struct HIL_ACTUATOR_CONTROLS_DATA {
15494    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15495    pub time_usec: u64,
15496    #[doc = "Flags bitmask."]
15497    pub flags: HilActuatorControlsFlags,
15498    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
15499    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15500    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15501    pub controls: [f32; 16],
15502    #[doc = "System mode. Includes arming state."]
15503    pub mode: MavModeFlag,
15504}
15505impl HIL_ACTUATOR_CONTROLS_DATA {
15506    pub const ENCODED_LEN: usize = 81usize;
15507    pub const DEFAULT: Self = Self {
15508        time_usec: 0_u64,
15509        flags: HilActuatorControlsFlags::DEFAULT,
15510        controls: [0.0_f32; 16usize],
15511        mode: MavModeFlag::DEFAULT,
15512    };
15513    #[cfg(feature = "arbitrary")]
15514    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15515        use arbitrary::{Arbitrary, Unstructured};
15516        let mut buf = [0u8; 1024];
15517        rng.fill_bytes(&mut buf);
15518        let mut unstructured = Unstructured::new(&buf);
15519        Self::arbitrary(&mut unstructured).unwrap_or_default()
15520    }
15521}
15522impl Default for HIL_ACTUATOR_CONTROLS_DATA {
15523    fn default() -> Self {
15524        Self::DEFAULT.clone()
15525    }
15526}
15527impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
15528    type Message = MavMessage;
15529    const ID: u32 = 93u32;
15530    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
15531    const EXTRA_CRC: u8 = 47u8;
15532    const ENCODED_LEN: usize = 81usize;
15533    fn deser(
15534        _version: MavlinkVersion,
15535        __input: &[u8],
15536    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15537        let avail_len = __input.len();
15538        let mut payload_buf = [0; Self::ENCODED_LEN];
15539        let mut buf = if avail_len < Self::ENCODED_LEN {
15540            payload_buf[0..avail_len].copy_from_slice(__input);
15541            Bytes::new(&payload_buf)
15542        } else {
15543            Bytes::new(__input)
15544        };
15545        let mut __struct = Self::default();
15546        __struct.time_usec = buf.get_u64_le()?;
15547        let tmp = buf.get_u64_le()?;
15548        __struct.flags =
15549            HilActuatorControlsFlags::from_bits(tmp as <HilActuatorControlsFlags as Flags>::Bits)
15550                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15551                flag_type: "HilActuatorControlsFlags",
15552                value: tmp as u64,
15553            })?;
15554        for v in &mut __struct.controls {
15555            let val = buf.get_f32_le()?;
15556            *v = val;
15557        }
15558        let tmp = buf.get_u8()?;
15559        __struct.mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
15560            ::mavlink_core::error::ParserError::InvalidFlag {
15561                flag_type: "MavModeFlag",
15562                value: tmp as u64,
15563            },
15564        )?;
15565        Ok(__struct)
15566    }
15567    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15568        let mut __tmp = BytesMut::new(bytes);
15569        #[allow(clippy::absurd_extreme_comparisons)]
15570        #[allow(unused_comparisons)]
15571        if __tmp.remaining() < Self::ENCODED_LEN {
15572            panic!(
15573                "buffer is too small (need {} bytes, but got {})",
15574                Self::ENCODED_LEN,
15575                __tmp.remaining(),
15576            )
15577        }
15578        __tmp.put_u64_le(self.time_usec);
15579        __tmp.put_u64_le(self.flags.bits() as u64);
15580        for val in &self.controls {
15581            __tmp.put_f32_le(*val);
15582        }
15583        __tmp.put_u8(self.mode.bits() as u8);
15584        if matches!(version, MavlinkVersion::V2) {
15585            let len = __tmp.len();
15586            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15587        } else {
15588            __tmp.len()
15589        }
15590    }
15591}
15592#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
15593#[doc = ""]
15594#[doc = "ID: 91"]
15595#[derive(Debug, Clone, PartialEq)]
15596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15597#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15598#[cfg_attr(feature = "ts", derive(TS))]
15599#[cfg_attr(feature = "ts", ts(export))]
15600pub struct HIL_CONTROLS_DATA {
15601    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15602    pub time_usec: u64,
15603    #[doc = "Control output -1 .. 1"]
15604    pub roll_ailerons: f32,
15605    #[doc = "Control output -1 .. 1"]
15606    pub pitch_elevator: f32,
15607    #[doc = "Control output -1 .. 1"]
15608    pub yaw_rudder: f32,
15609    #[doc = "Throttle 0 .. 1"]
15610    pub throttle: f32,
15611    #[doc = "Aux 1, -1 .. 1"]
15612    pub aux1: f32,
15613    #[doc = "Aux 2, -1 .. 1"]
15614    pub aux2: f32,
15615    #[doc = "Aux 3, -1 .. 1"]
15616    pub aux3: f32,
15617    #[doc = "Aux 4, -1 .. 1"]
15618    pub aux4: f32,
15619    #[doc = "System mode."]
15620    pub mode: MavMode,
15621    #[doc = "Navigation mode (MAV_NAV_MODE)"]
15622    pub nav_mode: u8,
15623}
15624impl HIL_CONTROLS_DATA {
15625    pub const ENCODED_LEN: usize = 42usize;
15626    pub const DEFAULT: Self = Self {
15627        time_usec: 0_u64,
15628        roll_ailerons: 0.0_f32,
15629        pitch_elevator: 0.0_f32,
15630        yaw_rudder: 0.0_f32,
15631        throttle: 0.0_f32,
15632        aux1: 0.0_f32,
15633        aux2: 0.0_f32,
15634        aux3: 0.0_f32,
15635        aux4: 0.0_f32,
15636        mode: MavMode::DEFAULT,
15637        nav_mode: 0_u8,
15638    };
15639    #[cfg(feature = "arbitrary")]
15640    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15641        use arbitrary::{Arbitrary, Unstructured};
15642        let mut buf = [0u8; 1024];
15643        rng.fill_bytes(&mut buf);
15644        let mut unstructured = Unstructured::new(&buf);
15645        Self::arbitrary(&mut unstructured).unwrap_or_default()
15646    }
15647}
15648impl Default for HIL_CONTROLS_DATA {
15649    fn default() -> Self {
15650        Self::DEFAULT.clone()
15651    }
15652}
15653impl MessageData for HIL_CONTROLS_DATA {
15654    type Message = MavMessage;
15655    const ID: u32 = 91u32;
15656    const NAME: &'static str = "HIL_CONTROLS";
15657    const EXTRA_CRC: u8 = 63u8;
15658    const ENCODED_LEN: usize = 42usize;
15659    fn deser(
15660        _version: MavlinkVersion,
15661        __input: &[u8],
15662    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15663        let avail_len = __input.len();
15664        let mut payload_buf = [0; Self::ENCODED_LEN];
15665        let mut buf = if avail_len < Self::ENCODED_LEN {
15666            payload_buf[0..avail_len].copy_from_slice(__input);
15667            Bytes::new(&payload_buf)
15668        } else {
15669            Bytes::new(__input)
15670        };
15671        let mut __struct = Self::default();
15672        __struct.time_usec = buf.get_u64_le()?;
15673        __struct.roll_ailerons = buf.get_f32_le()?;
15674        __struct.pitch_elevator = buf.get_f32_le()?;
15675        __struct.yaw_rudder = buf.get_f32_le()?;
15676        __struct.throttle = buf.get_f32_le()?;
15677        __struct.aux1 = buf.get_f32_le()?;
15678        __struct.aux2 = buf.get_f32_le()?;
15679        __struct.aux3 = buf.get_f32_le()?;
15680        __struct.aux4 = buf.get_f32_le()?;
15681        let tmp = buf.get_u8()?;
15682        __struct.mode =
15683            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15684                enum_type: "MavMode",
15685                value: tmp as u64,
15686            })?;
15687        __struct.nav_mode = buf.get_u8()?;
15688        Ok(__struct)
15689    }
15690    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15691        let mut __tmp = BytesMut::new(bytes);
15692        #[allow(clippy::absurd_extreme_comparisons)]
15693        #[allow(unused_comparisons)]
15694        if __tmp.remaining() < Self::ENCODED_LEN {
15695            panic!(
15696                "buffer is too small (need {} bytes, but got {})",
15697                Self::ENCODED_LEN,
15698                __tmp.remaining(),
15699            )
15700        }
15701        __tmp.put_u64_le(self.time_usec);
15702        __tmp.put_f32_le(self.roll_ailerons);
15703        __tmp.put_f32_le(self.pitch_elevator);
15704        __tmp.put_f32_le(self.yaw_rudder);
15705        __tmp.put_f32_le(self.throttle);
15706        __tmp.put_f32_le(self.aux1);
15707        __tmp.put_f32_le(self.aux2);
15708        __tmp.put_f32_le(self.aux3);
15709        __tmp.put_f32_le(self.aux4);
15710        __tmp.put_u8(self.mode as u8);
15711        __tmp.put_u8(self.nav_mode);
15712        if matches!(version, MavlinkVersion::V2) {
15713            let len = __tmp.len();
15714            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15715        } else {
15716            __tmp.len()
15717        }
15718    }
15719}
15720#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15721#[doc = ""]
15722#[doc = "ID: 113"]
15723#[derive(Debug, Clone, PartialEq)]
15724#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15725#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15726#[cfg_attr(feature = "ts", derive(TS))]
15727#[cfg_attr(feature = "ts", ts(export))]
15728pub struct HIL_GPS_DATA {
15729    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15730    pub time_usec: u64,
15731    #[doc = "Latitude (WGS84)"]
15732    pub lat: i32,
15733    #[doc = "Longitude (WGS84)"]
15734    pub lon: i32,
15735    #[doc = "Altitude (MSL). Positive for up."]
15736    pub alt: i32,
15737    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15738    pub eph: u16,
15739    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15740    pub epv: u16,
15741    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15742    pub vel: u16,
15743    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
15744    pub vn: i16,
15745    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
15746    pub ve: i16,
15747    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
15748    pub vd: i16,
15749    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15750    pub cog: u16,
15751    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
15752    pub fix_type: u8,
15753    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15754    pub satellites_visible: u8,
15755    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
15756    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15757    pub id: u8,
15758    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
15759    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15760    pub yaw: u16,
15761}
15762impl HIL_GPS_DATA {
15763    pub const ENCODED_LEN: usize = 39usize;
15764    pub const DEFAULT: Self = Self {
15765        time_usec: 0_u64,
15766        lat: 0_i32,
15767        lon: 0_i32,
15768        alt: 0_i32,
15769        eph: 0_u16,
15770        epv: 0_u16,
15771        vel: 0_u16,
15772        vn: 0_i16,
15773        ve: 0_i16,
15774        vd: 0_i16,
15775        cog: 0_u16,
15776        fix_type: 0_u8,
15777        satellites_visible: 0_u8,
15778        id: 0_u8,
15779        yaw: 0_u16,
15780    };
15781    #[cfg(feature = "arbitrary")]
15782    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15783        use arbitrary::{Arbitrary, Unstructured};
15784        let mut buf = [0u8; 1024];
15785        rng.fill_bytes(&mut buf);
15786        let mut unstructured = Unstructured::new(&buf);
15787        Self::arbitrary(&mut unstructured).unwrap_or_default()
15788    }
15789}
15790impl Default for HIL_GPS_DATA {
15791    fn default() -> Self {
15792        Self::DEFAULT.clone()
15793    }
15794}
15795impl MessageData for HIL_GPS_DATA {
15796    type Message = MavMessage;
15797    const ID: u32 = 113u32;
15798    const NAME: &'static str = "HIL_GPS";
15799    const EXTRA_CRC: u8 = 124u8;
15800    const ENCODED_LEN: usize = 39usize;
15801    fn deser(
15802        _version: MavlinkVersion,
15803        __input: &[u8],
15804    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15805        let avail_len = __input.len();
15806        let mut payload_buf = [0; Self::ENCODED_LEN];
15807        let mut buf = if avail_len < Self::ENCODED_LEN {
15808            payload_buf[0..avail_len].copy_from_slice(__input);
15809            Bytes::new(&payload_buf)
15810        } else {
15811            Bytes::new(__input)
15812        };
15813        let mut __struct = Self::default();
15814        __struct.time_usec = buf.get_u64_le()?;
15815        __struct.lat = buf.get_i32_le()?;
15816        __struct.lon = buf.get_i32_le()?;
15817        __struct.alt = buf.get_i32_le()?;
15818        __struct.eph = buf.get_u16_le()?;
15819        __struct.epv = buf.get_u16_le()?;
15820        __struct.vel = buf.get_u16_le()?;
15821        __struct.vn = buf.get_i16_le()?;
15822        __struct.ve = buf.get_i16_le()?;
15823        __struct.vd = buf.get_i16_le()?;
15824        __struct.cog = buf.get_u16_le()?;
15825        __struct.fix_type = buf.get_u8()?;
15826        __struct.satellites_visible = buf.get_u8()?;
15827        __struct.id = buf.get_u8()?;
15828        __struct.yaw = buf.get_u16_le()?;
15829        Ok(__struct)
15830    }
15831    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15832        let mut __tmp = BytesMut::new(bytes);
15833        #[allow(clippy::absurd_extreme_comparisons)]
15834        #[allow(unused_comparisons)]
15835        if __tmp.remaining() < Self::ENCODED_LEN {
15836            panic!(
15837                "buffer is too small (need {} bytes, but got {})",
15838                Self::ENCODED_LEN,
15839                __tmp.remaining(),
15840            )
15841        }
15842        __tmp.put_u64_le(self.time_usec);
15843        __tmp.put_i32_le(self.lat);
15844        __tmp.put_i32_le(self.lon);
15845        __tmp.put_i32_le(self.alt);
15846        __tmp.put_u16_le(self.eph);
15847        __tmp.put_u16_le(self.epv);
15848        __tmp.put_u16_le(self.vel);
15849        __tmp.put_i16_le(self.vn);
15850        __tmp.put_i16_le(self.ve);
15851        __tmp.put_i16_le(self.vd);
15852        __tmp.put_u16_le(self.cog);
15853        __tmp.put_u8(self.fix_type);
15854        __tmp.put_u8(self.satellites_visible);
15855        if matches!(version, MavlinkVersion::V2) {
15856            __tmp.put_u8(self.id);
15857            __tmp.put_u16_le(self.yaw);
15858            let len = __tmp.len();
15859            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15860        } else {
15861            __tmp.len()
15862        }
15863    }
15864}
15865#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
15866#[doc = ""]
15867#[doc = "ID: 114"]
15868#[derive(Debug, Clone, PartialEq)]
15869#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15870#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15871#[cfg_attr(feature = "ts", derive(TS))]
15872#[cfg_attr(feature = "ts", ts(export))]
15873pub struct HIL_OPTICAL_FLOW_DATA {
15874    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15875    pub time_usec: u64,
15876    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
15877    pub integration_time_us: u32,
15878    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
15879    pub integrated_x: f32,
15880    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
15881    pub integrated_y: f32,
15882    #[doc = "RH rotation around X axis"]
15883    pub integrated_xgyro: f32,
15884    #[doc = "RH rotation around Y axis"]
15885    pub integrated_ygyro: f32,
15886    #[doc = "RH rotation around Z axis"]
15887    pub integrated_zgyro: f32,
15888    #[doc = "Time since the distance was sampled."]
15889    pub time_delta_distance_us: u32,
15890    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
15891    pub distance: f32,
15892    #[doc = "Temperature"]
15893    pub temperature: i16,
15894    #[doc = "Sensor ID"]
15895    pub sensor_id: u8,
15896    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
15897    pub quality: u8,
15898}
15899impl HIL_OPTICAL_FLOW_DATA {
15900    pub const ENCODED_LEN: usize = 44usize;
15901    pub const DEFAULT: Self = Self {
15902        time_usec: 0_u64,
15903        integration_time_us: 0_u32,
15904        integrated_x: 0.0_f32,
15905        integrated_y: 0.0_f32,
15906        integrated_xgyro: 0.0_f32,
15907        integrated_ygyro: 0.0_f32,
15908        integrated_zgyro: 0.0_f32,
15909        time_delta_distance_us: 0_u32,
15910        distance: 0.0_f32,
15911        temperature: 0_i16,
15912        sensor_id: 0_u8,
15913        quality: 0_u8,
15914    };
15915    #[cfg(feature = "arbitrary")]
15916    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15917        use arbitrary::{Arbitrary, Unstructured};
15918        let mut buf = [0u8; 1024];
15919        rng.fill_bytes(&mut buf);
15920        let mut unstructured = Unstructured::new(&buf);
15921        Self::arbitrary(&mut unstructured).unwrap_or_default()
15922    }
15923}
15924impl Default for HIL_OPTICAL_FLOW_DATA {
15925    fn default() -> Self {
15926        Self::DEFAULT.clone()
15927    }
15928}
15929impl MessageData for HIL_OPTICAL_FLOW_DATA {
15930    type Message = MavMessage;
15931    const ID: u32 = 114u32;
15932    const NAME: &'static str = "HIL_OPTICAL_FLOW";
15933    const EXTRA_CRC: u8 = 237u8;
15934    const ENCODED_LEN: usize = 44usize;
15935    fn deser(
15936        _version: MavlinkVersion,
15937        __input: &[u8],
15938    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15939        let avail_len = __input.len();
15940        let mut payload_buf = [0; Self::ENCODED_LEN];
15941        let mut buf = if avail_len < Self::ENCODED_LEN {
15942            payload_buf[0..avail_len].copy_from_slice(__input);
15943            Bytes::new(&payload_buf)
15944        } else {
15945            Bytes::new(__input)
15946        };
15947        let mut __struct = Self::default();
15948        __struct.time_usec = buf.get_u64_le()?;
15949        __struct.integration_time_us = buf.get_u32_le()?;
15950        __struct.integrated_x = buf.get_f32_le()?;
15951        __struct.integrated_y = buf.get_f32_le()?;
15952        __struct.integrated_xgyro = buf.get_f32_le()?;
15953        __struct.integrated_ygyro = buf.get_f32_le()?;
15954        __struct.integrated_zgyro = buf.get_f32_le()?;
15955        __struct.time_delta_distance_us = buf.get_u32_le()?;
15956        __struct.distance = buf.get_f32_le()?;
15957        __struct.temperature = buf.get_i16_le()?;
15958        __struct.sensor_id = buf.get_u8()?;
15959        __struct.quality = buf.get_u8()?;
15960        Ok(__struct)
15961    }
15962    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15963        let mut __tmp = BytesMut::new(bytes);
15964        #[allow(clippy::absurd_extreme_comparisons)]
15965        #[allow(unused_comparisons)]
15966        if __tmp.remaining() < Self::ENCODED_LEN {
15967            panic!(
15968                "buffer is too small (need {} bytes, but got {})",
15969                Self::ENCODED_LEN,
15970                __tmp.remaining(),
15971            )
15972        }
15973        __tmp.put_u64_le(self.time_usec);
15974        __tmp.put_u32_le(self.integration_time_us);
15975        __tmp.put_f32_le(self.integrated_x);
15976        __tmp.put_f32_le(self.integrated_y);
15977        __tmp.put_f32_le(self.integrated_xgyro);
15978        __tmp.put_f32_le(self.integrated_ygyro);
15979        __tmp.put_f32_le(self.integrated_zgyro);
15980        __tmp.put_u32_le(self.time_delta_distance_us);
15981        __tmp.put_f32_le(self.distance);
15982        __tmp.put_i16_le(self.temperature);
15983        __tmp.put_u8(self.sensor_id);
15984        __tmp.put_u8(self.quality);
15985        if matches!(version, MavlinkVersion::V2) {
15986            let len = __tmp.len();
15987            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15988        } else {
15989            __tmp.len()
15990        }
15991    }
15992}
15993#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
15994#[doc = ""]
15995#[doc = "ID: 92"]
15996#[derive(Debug, Clone, PartialEq)]
15997#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15998#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15999#[cfg_attr(feature = "ts", derive(TS))]
16000#[cfg_attr(feature = "ts", ts(export))]
16001pub struct HIL_RC_INPUTS_RAW_DATA {
16002    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16003    pub time_usec: u64,
16004    #[doc = "RC channel 1 value"]
16005    pub chan1_raw: u16,
16006    #[doc = "RC channel 2 value"]
16007    pub chan2_raw: u16,
16008    #[doc = "RC channel 3 value"]
16009    pub chan3_raw: u16,
16010    #[doc = "RC channel 4 value"]
16011    pub chan4_raw: u16,
16012    #[doc = "RC channel 5 value"]
16013    pub chan5_raw: u16,
16014    #[doc = "RC channel 6 value"]
16015    pub chan6_raw: u16,
16016    #[doc = "RC channel 7 value"]
16017    pub chan7_raw: u16,
16018    #[doc = "RC channel 8 value"]
16019    pub chan8_raw: u16,
16020    #[doc = "RC channel 9 value"]
16021    pub chan9_raw: u16,
16022    #[doc = "RC channel 10 value"]
16023    pub chan10_raw: u16,
16024    #[doc = "RC channel 11 value"]
16025    pub chan11_raw: u16,
16026    #[doc = "RC channel 12 value"]
16027    pub chan12_raw: u16,
16028    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16029    pub rssi: u8,
16030}
16031impl HIL_RC_INPUTS_RAW_DATA {
16032    pub const ENCODED_LEN: usize = 33usize;
16033    pub const DEFAULT: Self = Self {
16034        time_usec: 0_u64,
16035        chan1_raw: 0_u16,
16036        chan2_raw: 0_u16,
16037        chan3_raw: 0_u16,
16038        chan4_raw: 0_u16,
16039        chan5_raw: 0_u16,
16040        chan6_raw: 0_u16,
16041        chan7_raw: 0_u16,
16042        chan8_raw: 0_u16,
16043        chan9_raw: 0_u16,
16044        chan10_raw: 0_u16,
16045        chan11_raw: 0_u16,
16046        chan12_raw: 0_u16,
16047        rssi: 0_u8,
16048    };
16049    #[cfg(feature = "arbitrary")]
16050    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16051        use arbitrary::{Arbitrary, Unstructured};
16052        let mut buf = [0u8; 1024];
16053        rng.fill_bytes(&mut buf);
16054        let mut unstructured = Unstructured::new(&buf);
16055        Self::arbitrary(&mut unstructured).unwrap_or_default()
16056    }
16057}
16058impl Default for HIL_RC_INPUTS_RAW_DATA {
16059    fn default() -> Self {
16060        Self::DEFAULT.clone()
16061    }
16062}
16063impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16064    type Message = MavMessage;
16065    const ID: u32 = 92u32;
16066    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16067    const EXTRA_CRC: u8 = 54u8;
16068    const ENCODED_LEN: usize = 33usize;
16069    fn deser(
16070        _version: MavlinkVersion,
16071        __input: &[u8],
16072    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16073        let avail_len = __input.len();
16074        let mut payload_buf = [0; Self::ENCODED_LEN];
16075        let mut buf = if avail_len < Self::ENCODED_LEN {
16076            payload_buf[0..avail_len].copy_from_slice(__input);
16077            Bytes::new(&payload_buf)
16078        } else {
16079            Bytes::new(__input)
16080        };
16081        let mut __struct = Self::default();
16082        __struct.time_usec = buf.get_u64_le()?;
16083        __struct.chan1_raw = buf.get_u16_le()?;
16084        __struct.chan2_raw = buf.get_u16_le()?;
16085        __struct.chan3_raw = buf.get_u16_le()?;
16086        __struct.chan4_raw = buf.get_u16_le()?;
16087        __struct.chan5_raw = buf.get_u16_le()?;
16088        __struct.chan6_raw = buf.get_u16_le()?;
16089        __struct.chan7_raw = buf.get_u16_le()?;
16090        __struct.chan8_raw = buf.get_u16_le()?;
16091        __struct.chan9_raw = buf.get_u16_le()?;
16092        __struct.chan10_raw = buf.get_u16_le()?;
16093        __struct.chan11_raw = buf.get_u16_le()?;
16094        __struct.chan12_raw = buf.get_u16_le()?;
16095        __struct.rssi = buf.get_u8()?;
16096        Ok(__struct)
16097    }
16098    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16099        let mut __tmp = BytesMut::new(bytes);
16100        #[allow(clippy::absurd_extreme_comparisons)]
16101        #[allow(unused_comparisons)]
16102        if __tmp.remaining() < Self::ENCODED_LEN {
16103            panic!(
16104                "buffer is too small (need {} bytes, but got {})",
16105                Self::ENCODED_LEN,
16106                __tmp.remaining(),
16107            )
16108        }
16109        __tmp.put_u64_le(self.time_usec);
16110        __tmp.put_u16_le(self.chan1_raw);
16111        __tmp.put_u16_le(self.chan2_raw);
16112        __tmp.put_u16_le(self.chan3_raw);
16113        __tmp.put_u16_le(self.chan4_raw);
16114        __tmp.put_u16_le(self.chan5_raw);
16115        __tmp.put_u16_le(self.chan6_raw);
16116        __tmp.put_u16_le(self.chan7_raw);
16117        __tmp.put_u16_le(self.chan8_raw);
16118        __tmp.put_u16_le(self.chan9_raw);
16119        __tmp.put_u16_le(self.chan10_raw);
16120        __tmp.put_u16_le(self.chan11_raw);
16121        __tmp.put_u16_le(self.chan12_raw);
16122        __tmp.put_u8(self.rssi);
16123        if matches!(version, MavlinkVersion::V2) {
16124            let len = __tmp.len();
16125            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16126        } else {
16127            __tmp.len()
16128        }
16129    }
16130}
16131#[doc = "The IMU readings in SI units in NED body frame."]
16132#[doc = ""]
16133#[doc = "ID: 107"]
16134#[derive(Debug, Clone, PartialEq)]
16135#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16136#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16137#[cfg_attr(feature = "ts", derive(TS))]
16138#[cfg_attr(feature = "ts", ts(export))]
16139pub struct HIL_SENSOR_DATA {
16140    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16141    pub time_usec: u64,
16142    #[doc = "X acceleration"]
16143    pub xacc: f32,
16144    #[doc = "Y acceleration"]
16145    pub yacc: f32,
16146    #[doc = "Z acceleration"]
16147    pub zacc: f32,
16148    #[doc = "Angular speed around X axis in body frame"]
16149    pub xgyro: f32,
16150    #[doc = "Angular speed around Y axis in body frame"]
16151    pub ygyro: f32,
16152    #[doc = "Angular speed around Z axis in body frame"]
16153    pub zgyro: f32,
16154    #[doc = "X Magnetic field"]
16155    pub xmag: f32,
16156    #[doc = "Y Magnetic field"]
16157    pub ymag: f32,
16158    #[doc = "Z Magnetic field"]
16159    pub zmag: f32,
16160    #[doc = "Absolute pressure"]
16161    pub abs_pressure: f32,
16162    #[doc = "Differential pressure (airspeed)"]
16163    pub diff_pressure: f32,
16164    #[doc = "Altitude calculated from pressure"]
16165    pub pressure_alt: f32,
16166    #[doc = "Temperature"]
16167    pub temperature: f32,
16168    #[doc = "Bitmap for fields that have updated since last message"]
16169    pub fields_updated: HilSensorUpdatedFlags,
16170    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
16171    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16172    pub id: u8,
16173}
16174impl HIL_SENSOR_DATA {
16175    pub const ENCODED_LEN: usize = 65usize;
16176    pub const DEFAULT: Self = Self {
16177        time_usec: 0_u64,
16178        xacc: 0.0_f32,
16179        yacc: 0.0_f32,
16180        zacc: 0.0_f32,
16181        xgyro: 0.0_f32,
16182        ygyro: 0.0_f32,
16183        zgyro: 0.0_f32,
16184        xmag: 0.0_f32,
16185        ymag: 0.0_f32,
16186        zmag: 0.0_f32,
16187        abs_pressure: 0.0_f32,
16188        diff_pressure: 0.0_f32,
16189        pressure_alt: 0.0_f32,
16190        temperature: 0.0_f32,
16191        fields_updated: HilSensorUpdatedFlags::DEFAULT,
16192        id: 0_u8,
16193    };
16194    #[cfg(feature = "arbitrary")]
16195    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16196        use arbitrary::{Arbitrary, Unstructured};
16197        let mut buf = [0u8; 1024];
16198        rng.fill_bytes(&mut buf);
16199        let mut unstructured = Unstructured::new(&buf);
16200        Self::arbitrary(&mut unstructured).unwrap_or_default()
16201    }
16202}
16203impl Default for HIL_SENSOR_DATA {
16204    fn default() -> Self {
16205        Self::DEFAULT.clone()
16206    }
16207}
16208impl MessageData for HIL_SENSOR_DATA {
16209    type Message = MavMessage;
16210    const ID: u32 = 107u32;
16211    const NAME: &'static str = "HIL_SENSOR";
16212    const EXTRA_CRC: u8 = 108u8;
16213    const ENCODED_LEN: usize = 65usize;
16214    fn deser(
16215        _version: MavlinkVersion,
16216        __input: &[u8],
16217    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16218        let avail_len = __input.len();
16219        let mut payload_buf = [0; Self::ENCODED_LEN];
16220        let mut buf = if avail_len < Self::ENCODED_LEN {
16221            payload_buf[0..avail_len].copy_from_slice(__input);
16222            Bytes::new(&payload_buf)
16223        } else {
16224            Bytes::new(__input)
16225        };
16226        let mut __struct = Self::default();
16227        __struct.time_usec = buf.get_u64_le()?;
16228        __struct.xacc = buf.get_f32_le()?;
16229        __struct.yacc = buf.get_f32_le()?;
16230        __struct.zacc = buf.get_f32_le()?;
16231        __struct.xgyro = buf.get_f32_le()?;
16232        __struct.ygyro = buf.get_f32_le()?;
16233        __struct.zgyro = buf.get_f32_le()?;
16234        __struct.xmag = buf.get_f32_le()?;
16235        __struct.ymag = buf.get_f32_le()?;
16236        __struct.zmag = buf.get_f32_le()?;
16237        __struct.abs_pressure = buf.get_f32_le()?;
16238        __struct.diff_pressure = buf.get_f32_le()?;
16239        __struct.pressure_alt = buf.get_f32_le()?;
16240        __struct.temperature = buf.get_f32_le()?;
16241        let tmp = buf.get_u32_le()?;
16242        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
16243            tmp as <HilSensorUpdatedFlags as Flags>::Bits,
16244        )
16245        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16246            flag_type: "HilSensorUpdatedFlags",
16247            value: tmp as u64,
16248        })?;
16249        __struct.id = buf.get_u8()?;
16250        Ok(__struct)
16251    }
16252    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16253        let mut __tmp = BytesMut::new(bytes);
16254        #[allow(clippy::absurd_extreme_comparisons)]
16255        #[allow(unused_comparisons)]
16256        if __tmp.remaining() < Self::ENCODED_LEN {
16257            panic!(
16258                "buffer is too small (need {} bytes, but got {})",
16259                Self::ENCODED_LEN,
16260                __tmp.remaining(),
16261            )
16262        }
16263        __tmp.put_u64_le(self.time_usec);
16264        __tmp.put_f32_le(self.xacc);
16265        __tmp.put_f32_le(self.yacc);
16266        __tmp.put_f32_le(self.zacc);
16267        __tmp.put_f32_le(self.xgyro);
16268        __tmp.put_f32_le(self.ygyro);
16269        __tmp.put_f32_le(self.zgyro);
16270        __tmp.put_f32_le(self.xmag);
16271        __tmp.put_f32_le(self.ymag);
16272        __tmp.put_f32_le(self.zmag);
16273        __tmp.put_f32_le(self.abs_pressure);
16274        __tmp.put_f32_le(self.diff_pressure);
16275        __tmp.put_f32_le(self.pressure_alt);
16276        __tmp.put_f32_le(self.temperature);
16277        __tmp.put_u32_le(self.fields_updated.bits() as u32);
16278        if matches!(version, MavlinkVersion::V2) {
16279            __tmp.put_u8(self.id);
16280            let len = __tmp.len();
16281            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16282        } else {
16283            __tmp.len()
16284        }
16285    }
16286}
16287#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
16288#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16289#[doc = ""]
16290#[doc = "ID: 90"]
16291#[derive(Debug, Clone, PartialEq)]
16292#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16293#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16294#[cfg_attr(feature = "ts", derive(TS))]
16295#[cfg_attr(feature = "ts", ts(export))]
16296pub struct HIL_STATE_DATA {
16297    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16298    pub time_usec: u64,
16299    #[doc = "Roll angle"]
16300    pub roll: f32,
16301    #[doc = "Pitch angle"]
16302    pub pitch: f32,
16303    #[doc = "Yaw angle"]
16304    pub yaw: f32,
16305    #[doc = "Body frame roll / phi angular speed"]
16306    pub rollspeed: f32,
16307    #[doc = "Body frame pitch / theta angular speed"]
16308    pub pitchspeed: f32,
16309    #[doc = "Body frame yaw / psi angular speed"]
16310    pub yawspeed: f32,
16311    #[doc = "Latitude"]
16312    pub lat: i32,
16313    #[doc = "Longitude"]
16314    pub lon: i32,
16315    #[doc = "Altitude"]
16316    pub alt: i32,
16317    #[doc = "Ground X Speed (Latitude)"]
16318    pub vx: i16,
16319    #[doc = "Ground Y Speed (Longitude)"]
16320    pub vy: i16,
16321    #[doc = "Ground Z Speed (Altitude)"]
16322    pub vz: i16,
16323    #[doc = "X acceleration"]
16324    pub xacc: i16,
16325    #[doc = "Y acceleration"]
16326    pub yacc: i16,
16327    #[doc = "Z acceleration"]
16328    pub zacc: i16,
16329}
16330impl HIL_STATE_DATA {
16331    pub const ENCODED_LEN: usize = 56usize;
16332    pub const DEFAULT: Self = Self {
16333        time_usec: 0_u64,
16334        roll: 0.0_f32,
16335        pitch: 0.0_f32,
16336        yaw: 0.0_f32,
16337        rollspeed: 0.0_f32,
16338        pitchspeed: 0.0_f32,
16339        yawspeed: 0.0_f32,
16340        lat: 0_i32,
16341        lon: 0_i32,
16342        alt: 0_i32,
16343        vx: 0_i16,
16344        vy: 0_i16,
16345        vz: 0_i16,
16346        xacc: 0_i16,
16347        yacc: 0_i16,
16348        zacc: 0_i16,
16349    };
16350    #[cfg(feature = "arbitrary")]
16351    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16352        use arbitrary::{Arbitrary, Unstructured};
16353        let mut buf = [0u8; 1024];
16354        rng.fill_bytes(&mut buf);
16355        let mut unstructured = Unstructured::new(&buf);
16356        Self::arbitrary(&mut unstructured).unwrap_or_default()
16357    }
16358}
16359impl Default for HIL_STATE_DATA {
16360    fn default() -> Self {
16361        Self::DEFAULT.clone()
16362    }
16363}
16364impl MessageData for HIL_STATE_DATA {
16365    type Message = MavMessage;
16366    const ID: u32 = 90u32;
16367    const NAME: &'static str = "HIL_STATE";
16368    const EXTRA_CRC: u8 = 183u8;
16369    const ENCODED_LEN: usize = 56usize;
16370    fn deser(
16371        _version: MavlinkVersion,
16372        __input: &[u8],
16373    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16374        let avail_len = __input.len();
16375        let mut payload_buf = [0; Self::ENCODED_LEN];
16376        let mut buf = if avail_len < Self::ENCODED_LEN {
16377            payload_buf[0..avail_len].copy_from_slice(__input);
16378            Bytes::new(&payload_buf)
16379        } else {
16380            Bytes::new(__input)
16381        };
16382        let mut __struct = Self::default();
16383        __struct.time_usec = buf.get_u64_le()?;
16384        __struct.roll = buf.get_f32_le()?;
16385        __struct.pitch = buf.get_f32_le()?;
16386        __struct.yaw = buf.get_f32_le()?;
16387        __struct.rollspeed = buf.get_f32_le()?;
16388        __struct.pitchspeed = buf.get_f32_le()?;
16389        __struct.yawspeed = buf.get_f32_le()?;
16390        __struct.lat = buf.get_i32_le()?;
16391        __struct.lon = buf.get_i32_le()?;
16392        __struct.alt = buf.get_i32_le()?;
16393        __struct.vx = buf.get_i16_le()?;
16394        __struct.vy = buf.get_i16_le()?;
16395        __struct.vz = buf.get_i16_le()?;
16396        __struct.xacc = buf.get_i16_le()?;
16397        __struct.yacc = buf.get_i16_le()?;
16398        __struct.zacc = buf.get_i16_le()?;
16399        Ok(__struct)
16400    }
16401    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16402        let mut __tmp = BytesMut::new(bytes);
16403        #[allow(clippy::absurd_extreme_comparisons)]
16404        #[allow(unused_comparisons)]
16405        if __tmp.remaining() < Self::ENCODED_LEN {
16406            panic!(
16407                "buffer is too small (need {} bytes, but got {})",
16408                Self::ENCODED_LEN,
16409                __tmp.remaining(),
16410            )
16411        }
16412        __tmp.put_u64_le(self.time_usec);
16413        __tmp.put_f32_le(self.roll);
16414        __tmp.put_f32_le(self.pitch);
16415        __tmp.put_f32_le(self.yaw);
16416        __tmp.put_f32_le(self.rollspeed);
16417        __tmp.put_f32_le(self.pitchspeed);
16418        __tmp.put_f32_le(self.yawspeed);
16419        __tmp.put_i32_le(self.lat);
16420        __tmp.put_i32_le(self.lon);
16421        __tmp.put_i32_le(self.alt);
16422        __tmp.put_i16_le(self.vx);
16423        __tmp.put_i16_le(self.vy);
16424        __tmp.put_i16_le(self.vz);
16425        __tmp.put_i16_le(self.xacc);
16426        __tmp.put_i16_le(self.yacc);
16427        __tmp.put_i16_le(self.zacc);
16428        if matches!(version, MavlinkVersion::V2) {
16429            let len = __tmp.len();
16430            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16431        } else {
16432            __tmp.len()
16433        }
16434    }
16435}
16436#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16437#[doc = ""]
16438#[doc = "ID: 115"]
16439#[derive(Debug, Clone, PartialEq)]
16440#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16441#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16442#[cfg_attr(feature = "ts", derive(TS))]
16443#[cfg_attr(feature = "ts", ts(export))]
16444pub struct HIL_STATE_QUATERNION_DATA {
16445    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16446    pub time_usec: u64,
16447    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
16448    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16449    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16450    pub attitude_quaternion: [f32; 4],
16451    #[doc = "Body frame roll / phi angular speed"]
16452    pub rollspeed: f32,
16453    #[doc = "Body frame pitch / theta angular speed"]
16454    pub pitchspeed: f32,
16455    #[doc = "Body frame yaw / psi angular speed"]
16456    pub yawspeed: f32,
16457    #[doc = "Latitude"]
16458    pub lat: i32,
16459    #[doc = "Longitude"]
16460    pub lon: i32,
16461    #[doc = "Altitude"]
16462    pub alt: i32,
16463    #[doc = "Ground X Speed (Latitude)"]
16464    pub vx: i16,
16465    #[doc = "Ground Y Speed (Longitude)"]
16466    pub vy: i16,
16467    #[doc = "Ground Z Speed (Altitude)"]
16468    pub vz: i16,
16469    #[doc = "Indicated airspeed"]
16470    pub ind_airspeed: u16,
16471    #[doc = "True airspeed"]
16472    pub true_airspeed: u16,
16473    #[doc = "X acceleration"]
16474    pub xacc: i16,
16475    #[doc = "Y acceleration"]
16476    pub yacc: i16,
16477    #[doc = "Z acceleration"]
16478    pub zacc: i16,
16479}
16480impl HIL_STATE_QUATERNION_DATA {
16481    pub const ENCODED_LEN: usize = 64usize;
16482    pub const DEFAULT: Self = Self {
16483        time_usec: 0_u64,
16484        attitude_quaternion: [0.0_f32; 4usize],
16485        rollspeed: 0.0_f32,
16486        pitchspeed: 0.0_f32,
16487        yawspeed: 0.0_f32,
16488        lat: 0_i32,
16489        lon: 0_i32,
16490        alt: 0_i32,
16491        vx: 0_i16,
16492        vy: 0_i16,
16493        vz: 0_i16,
16494        ind_airspeed: 0_u16,
16495        true_airspeed: 0_u16,
16496        xacc: 0_i16,
16497        yacc: 0_i16,
16498        zacc: 0_i16,
16499    };
16500    #[cfg(feature = "arbitrary")]
16501    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16502        use arbitrary::{Arbitrary, Unstructured};
16503        let mut buf = [0u8; 1024];
16504        rng.fill_bytes(&mut buf);
16505        let mut unstructured = Unstructured::new(&buf);
16506        Self::arbitrary(&mut unstructured).unwrap_or_default()
16507    }
16508}
16509impl Default for HIL_STATE_QUATERNION_DATA {
16510    fn default() -> Self {
16511        Self::DEFAULT.clone()
16512    }
16513}
16514impl MessageData for HIL_STATE_QUATERNION_DATA {
16515    type Message = MavMessage;
16516    const ID: u32 = 115u32;
16517    const NAME: &'static str = "HIL_STATE_QUATERNION";
16518    const EXTRA_CRC: u8 = 4u8;
16519    const ENCODED_LEN: usize = 64usize;
16520    fn deser(
16521        _version: MavlinkVersion,
16522        __input: &[u8],
16523    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16524        let avail_len = __input.len();
16525        let mut payload_buf = [0; Self::ENCODED_LEN];
16526        let mut buf = if avail_len < Self::ENCODED_LEN {
16527            payload_buf[0..avail_len].copy_from_slice(__input);
16528            Bytes::new(&payload_buf)
16529        } else {
16530            Bytes::new(__input)
16531        };
16532        let mut __struct = Self::default();
16533        __struct.time_usec = buf.get_u64_le()?;
16534        for v in &mut __struct.attitude_quaternion {
16535            let val = buf.get_f32_le()?;
16536            *v = val;
16537        }
16538        __struct.rollspeed = buf.get_f32_le()?;
16539        __struct.pitchspeed = buf.get_f32_le()?;
16540        __struct.yawspeed = buf.get_f32_le()?;
16541        __struct.lat = buf.get_i32_le()?;
16542        __struct.lon = buf.get_i32_le()?;
16543        __struct.alt = buf.get_i32_le()?;
16544        __struct.vx = buf.get_i16_le()?;
16545        __struct.vy = buf.get_i16_le()?;
16546        __struct.vz = buf.get_i16_le()?;
16547        __struct.ind_airspeed = buf.get_u16_le()?;
16548        __struct.true_airspeed = buf.get_u16_le()?;
16549        __struct.xacc = buf.get_i16_le()?;
16550        __struct.yacc = buf.get_i16_le()?;
16551        __struct.zacc = buf.get_i16_le()?;
16552        Ok(__struct)
16553    }
16554    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16555        let mut __tmp = BytesMut::new(bytes);
16556        #[allow(clippy::absurd_extreme_comparisons)]
16557        #[allow(unused_comparisons)]
16558        if __tmp.remaining() < Self::ENCODED_LEN {
16559            panic!(
16560                "buffer is too small (need {} bytes, but got {})",
16561                Self::ENCODED_LEN,
16562                __tmp.remaining(),
16563            )
16564        }
16565        __tmp.put_u64_le(self.time_usec);
16566        for val in &self.attitude_quaternion {
16567            __tmp.put_f32_le(*val);
16568        }
16569        __tmp.put_f32_le(self.rollspeed);
16570        __tmp.put_f32_le(self.pitchspeed);
16571        __tmp.put_f32_le(self.yawspeed);
16572        __tmp.put_i32_le(self.lat);
16573        __tmp.put_i32_le(self.lon);
16574        __tmp.put_i32_le(self.alt);
16575        __tmp.put_i16_le(self.vx);
16576        __tmp.put_i16_le(self.vy);
16577        __tmp.put_i16_le(self.vz);
16578        __tmp.put_u16_le(self.ind_airspeed);
16579        __tmp.put_u16_le(self.true_airspeed);
16580        __tmp.put_i16_le(self.xacc);
16581        __tmp.put_i16_le(self.yacc);
16582        __tmp.put_i16_le(self.zacc);
16583        if matches!(version, MavlinkVersion::V2) {
16584            let len = __tmp.len();
16585            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16586        } else {
16587            __tmp.len()
16588        }
16589    }
16590}
16591#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
16592#[doc = ""]
16593#[doc = "ID: 242"]
16594#[derive(Debug, Clone, PartialEq)]
16595#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16597#[cfg_attr(feature = "ts", derive(TS))]
16598#[cfg_attr(feature = "ts", ts(export))]
16599pub struct HOME_POSITION_DATA {
16600    #[doc = "Latitude (WGS84)"]
16601    pub latitude: i32,
16602    #[doc = "Longitude (WGS84)"]
16603    pub longitude: i32,
16604    #[doc = "Altitude (MSL). Positive for up."]
16605    pub altitude: i32,
16606    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
16607    pub x: f32,
16608    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
16609    pub y: f32,
16610    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
16611    pub z: f32,
16612    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
16613    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16614    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16615    pub q: [f32; 4],
16616    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16617    pub approach_x: f32,
16618    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16619    pub approach_y: f32,
16620    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16621    pub approach_z: f32,
16622    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16623    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16624    pub time_usec: u64,
16625}
16626impl HOME_POSITION_DATA {
16627    pub const ENCODED_LEN: usize = 60usize;
16628    pub const DEFAULT: Self = Self {
16629        latitude: 0_i32,
16630        longitude: 0_i32,
16631        altitude: 0_i32,
16632        x: 0.0_f32,
16633        y: 0.0_f32,
16634        z: 0.0_f32,
16635        q: [0.0_f32; 4usize],
16636        approach_x: 0.0_f32,
16637        approach_y: 0.0_f32,
16638        approach_z: 0.0_f32,
16639        time_usec: 0_u64,
16640    };
16641    #[cfg(feature = "arbitrary")]
16642    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16643        use arbitrary::{Arbitrary, Unstructured};
16644        let mut buf = [0u8; 1024];
16645        rng.fill_bytes(&mut buf);
16646        let mut unstructured = Unstructured::new(&buf);
16647        Self::arbitrary(&mut unstructured).unwrap_or_default()
16648    }
16649}
16650impl Default for HOME_POSITION_DATA {
16651    fn default() -> Self {
16652        Self::DEFAULT.clone()
16653    }
16654}
16655impl MessageData for HOME_POSITION_DATA {
16656    type Message = MavMessage;
16657    const ID: u32 = 242u32;
16658    const NAME: &'static str = "HOME_POSITION";
16659    const EXTRA_CRC: u8 = 104u8;
16660    const ENCODED_LEN: usize = 60usize;
16661    fn deser(
16662        _version: MavlinkVersion,
16663        __input: &[u8],
16664    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16665        let avail_len = __input.len();
16666        let mut payload_buf = [0; Self::ENCODED_LEN];
16667        let mut buf = if avail_len < Self::ENCODED_LEN {
16668            payload_buf[0..avail_len].copy_from_slice(__input);
16669            Bytes::new(&payload_buf)
16670        } else {
16671            Bytes::new(__input)
16672        };
16673        let mut __struct = Self::default();
16674        __struct.latitude = buf.get_i32_le()?;
16675        __struct.longitude = buf.get_i32_le()?;
16676        __struct.altitude = buf.get_i32_le()?;
16677        __struct.x = buf.get_f32_le()?;
16678        __struct.y = buf.get_f32_le()?;
16679        __struct.z = buf.get_f32_le()?;
16680        for v in &mut __struct.q {
16681            let val = buf.get_f32_le()?;
16682            *v = val;
16683        }
16684        __struct.approach_x = buf.get_f32_le()?;
16685        __struct.approach_y = buf.get_f32_le()?;
16686        __struct.approach_z = buf.get_f32_le()?;
16687        __struct.time_usec = buf.get_u64_le()?;
16688        Ok(__struct)
16689    }
16690    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16691        let mut __tmp = BytesMut::new(bytes);
16692        #[allow(clippy::absurd_extreme_comparisons)]
16693        #[allow(unused_comparisons)]
16694        if __tmp.remaining() < Self::ENCODED_LEN {
16695            panic!(
16696                "buffer is too small (need {} bytes, but got {})",
16697                Self::ENCODED_LEN,
16698                __tmp.remaining(),
16699            )
16700        }
16701        __tmp.put_i32_le(self.latitude);
16702        __tmp.put_i32_le(self.longitude);
16703        __tmp.put_i32_le(self.altitude);
16704        __tmp.put_f32_le(self.x);
16705        __tmp.put_f32_le(self.y);
16706        __tmp.put_f32_le(self.z);
16707        for val in &self.q {
16708            __tmp.put_f32_le(*val);
16709        }
16710        __tmp.put_f32_le(self.approach_x);
16711        __tmp.put_f32_le(self.approach_y);
16712        __tmp.put_f32_le(self.approach_z);
16713        if matches!(version, MavlinkVersion::V2) {
16714            __tmp.put_u64_le(self.time_usec);
16715            let len = __tmp.len();
16716            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16717        } else {
16718            __tmp.len()
16719        }
16720    }
16721}
16722#[doc = "Temperature and humidity from hygrometer."]
16723#[doc = ""]
16724#[doc = "ID: 12920"]
16725#[derive(Debug, Clone, PartialEq)]
16726#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16727#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16728#[cfg_attr(feature = "ts", derive(TS))]
16729#[cfg_attr(feature = "ts", ts(export))]
16730pub struct HYGROMETER_SENSOR_DATA {
16731    #[doc = "Temperature"]
16732    pub temperature: i16,
16733    #[doc = "Humidity"]
16734    pub humidity: u16,
16735    #[doc = "Hygrometer ID"]
16736    pub id: u8,
16737}
16738impl HYGROMETER_SENSOR_DATA {
16739    pub const ENCODED_LEN: usize = 5usize;
16740    pub const DEFAULT: Self = Self {
16741        temperature: 0_i16,
16742        humidity: 0_u16,
16743        id: 0_u8,
16744    };
16745    #[cfg(feature = "arbitrary")]
16746    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16747        use arbitrary::{Arbitrary, Unstructured};
16748        let mut buf = [0u8; 1024];
16749        rng.fill_bytes(&mut buf);
16750        let mut unstructured = Unstructured::new(&buf);
16751        Self::arbitrary(&mut unstructured).unwrap_or_default()
16752    }
16753}
16754impl Default for HYGROMETER_SENSOR_DATA {
16755    fn default() -> Self {
16756        Self::DEFAULT.clone()
16757    }
16758}
16759impl MessageData for HYGROMETER_SENSOR_DATA {
16760    type Message = MavMessage;
16761    const ID: u32 = 12920u32;
16762    const NAME: &'static str = "HYGROMETER_SENSOR";
16763    const EXTRA_CRC: u8 = 20u8;
16764    const ENCODED_LEN: usize = 5usize;
16765    fn deser(
16766        _version: MavlinkVersion,
16767        __input: &[u8],
16768    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16769        let avail_len = __input.len();
16770        let mut payload_buf = [0; Self::ENCODED_LEN];
16771        let mut buf = if avail_len < Self::ENCODED_LEN {
16772            payload_buf[0..avail_len].copy_from_slice(__input);
16773            Bytes::new(&payload_buf)
16774        } else {
16775            Bytes::new(__input)
16776        };
16777        let mut __struct = Self::default();
16778        __struct.temperature = buf.get_i16_le()?;
16779        __struct.humidity = buf.get_u16_le()?;
16780        __struct.id = buf.get_u8()?;
16781        Ok(__struct)
16782    }
16783    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16784        let mut __tmp = BytesMut::new(bytes);
16785        #[allow(clippy::absurd_extreme_comparisons)]
16786        #[allow(unused_comparisons)]
16787        if __tmp.remaining() < Self::ENCODED_LEN {
16788            panic!(
16789                "buffer is too small (need {} bytes, but got {})",
16790                Self::ENCODED_LEN,
16791                __tmp.remaining(),
16792            )
16793        }
16794        __tmp.put_i16_le(self.temperature);
16795        __tmp.put_u16_le(self.humidity);
16796        __tmp.put_u8(self.id);
16797        if matches!(version, MavlinkVersion::V2) {
16798            let len = __tmp.len();
16799            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16800        } else {
16801            __tmp.len()
16802        }
16803    }
16804}
16805#[doc = "Illuminator status."]
16806#[doc = ""]
16807#[doc = "ID: 440"]
16808#[derive(Debug, Clone, PartialEq)]
16809#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16810#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16811#[cfg_attr(feature = "ts", derive(TS))]
16812#[cfg_attr(feature = "ts", ts(export))]
16813pub struct ILLUMINATOR_STATUS_DATA {
16814    #[doc = "Time since the start-up of the illuminator in ms"]
16815    pub uptime_ms: u32,
16816    #[doc = "Errors"]
16817    pub error_status: IlluminatorErrorFlags,
16818    #[doc = "Illuminator brightness"]
16819    pub brightness: f32,
16820    #[doc = "Illuminator strobing period in seconds"]
16821    pub strobe_period: f32,
16822    #[doc = "Illuminator strobing duty cycle"]
16823    pub strobe_duty_cycle: f32,
16824    #[doc = "Temperature in Celsius"]
16825    pub temp_c: f32,
16826    #[doc = "Minimum strobing period in seconds"]
16827    pub min_strobe_period: f32,
16828    #[doc = "Maximum strobing period in seconds"]
16829    pub max_strobe_period: f32,
16830    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
16831    pub enable: u8,
16832    #[doc = "Supported illuminator modes"]
16833    pub mode_bitmask: IlluminatorMode,
16834    #[doc = "Illuminator mode"]
16835    pub mode: IlluminatorMode,
16836}
16837impl ILLUMINATOR_STATUS_DATA {
16838    pub const ENCODED_LEN: usize = 35usize;
16839    pub const DEFAULT: Self = Self {
16840        uptime_ms: 0_u32,
16841        error_status: IlluminatorErrorFlags::DEFAULT,
16842        brightness: 0.0_f32,
16843        strobe_period: 0.0_f32,
16844        strobe_duty_cycle: 0.0_f32,
16845        temp_c: 0.0_f32,
16846        min_strobe_period: 0.0_f32,
16847        max_strobe_period: 0.0_f32,
16848        enable: 0_u8,
16849        mode_bitmask: IlluminatorMode::DEFAULT,
16850        mode: IlluminatorMode::DEFAULT,
16851    };
16852    #[cfg(feature = "arbitrary")]
16853    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16854        use arbitrary::{Arbitrary, Unstructured};
16855        let mut buf = [0u8; 1024];
16856        rng.fill_bytes(&mut buf);
16857        let mut unstructured = Unstructured::new(&buf);
16858        Self::arbitrary(&mut unstructured).unwrap_or_default()
16859    }
16860}
16861impl Default for ILLUMINATOR_STATUS_DATA {
16862    fn default() -> Self {
16863        Self::DEFAULT.clone()
16864    }
16865}
16866impl MessageData for ILLUMINATOR_STATUS_DATA {
16867    type Message = MavMessage;
16868    const ID: u32 = 440u32;
16869    const NAME: &'static str = "ILLUMINATOR_STATUS";
16870    const EXTRA_CRC: u8 = 66u8;
16871    const ENCODED_LEN: usize = 35usize;
16872    fn deser(
16873        _version: MavlinkVersion,
16874        __input: &[u8],
16875    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16876        let avail_len = __input.len();
16877        let mut payload_buf = [0; Self::ENCODED_LEN];
16878        let mut buf = if avail_len < Self::ENCODED_LEN {
16879            payload_buf[0..avail_len].copy_from_slice(__input);
16880            Bytes::new(&payload_buf)
16881        } else {
16882            Bytes::new(__input)
16883        };
16884        let mut __struct = Self::default();
16885        __struct.uptime_ms = buf.get_u32_le()?;
16886        let tmp = buf.get_u32_le()?;
16887        __struct.error_status = IlluminatorErrorFlags::from_bits(
16888            tmp as <IlluminatorErrorFlags as Flags>::Bits,
16889        )
16890        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16891            flag_type: "IlluminatorErrorFlags",
16892            value: tmp as u64,
16893        })?;
16894        __struct.brightness = buf.get_f32_le()?;
16895        __struct.strobe_period = buf.get_f32_le()?;
16896        __struct.strobe_duty_cycle = buf.get_f32_le()?;
16897        __struct.temp_c = buf.get_f32_le()?;
16898        __struct.min_strobe_period = buf.get_f32_le()?;
16899        __struct.max_strobe_period = buf.get_f32_le()?;
16900        __struct.enable = buf.get_u8()?;
16901        let tmp = buf.get_u8()?;
16902        __struct.mode_bitmask =
16903            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16904                enum_type: "IlluminatorMode",
16905                value: tmp as u64,
16906            })?;
16907        let tmp = buf.get_u8()?;
16908        __struct.mode =
16909            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16910                enum_type: "IlluminatorMode",
16911                value: tmp as u64,
16912            })?;
16913        Ok(__struct)
16914    }
16915    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16916        let mut __tmp = BytesMut::new(bytes);
16917        #[allow(clippy::absurd_extreme_comparisons)]
16918        #[allow(unused_comparisons)]
16919        if __tmp.remaining() < Self::ENCODED_LEN {
16920            panic!(
16921                "buffer is too small (need {} bytes, but got {})",
16922                Self::ENCODED_LEN,
16923                __tmp.remaining(),
16924            )
16925        }
16926        __tmp.put_u32_le(self.uptime_ms);
16927        __tmp.put_u32_le(self.error_status.bits() as u32);
16928        __tmp.put_f32_le(self.brightness);
16929        __tmp.put_f32_le(self.strobe_period);
16930        __tmp.put_f32_le(self.strobe_duty_cycle);
16931        __tmp.put_f32_le(self.temp_c);
16932        __tmp.put_f32_le(self.min_strobe_period);
16933        __tmp.put_f32_le(self.max_strobe_period);
16934        __tmp.put_u8(self.enable);
16935        __tmp.put_u8(self.mode_bitmask as u8);
16936        __tmp.put_u8(self.mode as u8);
16937        if matches!(version, MavlinkVersion::V2) {
16938            let len = __tmp.len();
16939            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16940        } else {
16941            __tmp.len()
16942        }
16943    }
16944}
16945#[doc = "Status of the Iridium SBD link."]
16946#[doc = ""]
16947#[doc = "ID: 335"]
16948#[derive(Debug, Clone, PartialEq)]
16949#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16950#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16951#[cfg_attr(feature = "ts", derive(TS))]
16952#[cfg_attr(feature = "ts", ts(export))]
16953pub struct ISBD_LINK_STATUS_DATA {
16954    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16955    pub timestamp: u64,
16956    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16957    pub last_heartbeat: u64,
16958    #[doc = "Number of failed SBD sessions."]
16959    pub failed_sessions: u16,
16960    #[doc = "Number of successful SBD sessions."]
16961    pub successful_sessions: u16,
16962    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
16963    pub signal_quality: u8,
16964    #[doc = "1: Ring call pending, 0: No call pending."]
16965    pub ring_pending: u8,
16966    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
16967    pub tx_session_pending: u8,
16968    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
16969    pub rx_session_pending: u8,
16970}
16971impl ISBD_LINK_STATUS_DATA {
16972    pub const ENCODED_LEN: usize = 24usize;
16973    pub const DEFAULT: Self = Self {
16974        timestamp: 0_u64,
16975        last_heartbeat: 0_u64,
16976        failed_sessions: 0_u16,
16977        successful_sessions: 0_u16,
16978        signal_quality: 0_u8,
16979        ring_pending: 0_u8,
16980        tx_session_pending: 0_u8,
16981        rx_session_pending: 0_u8,
16982    };
16983    #[cfg(feature = "arbitrary")]
16984    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16985        use arbitrary::{Arbitrary, Unstructured};
16986        let mut buf = [0u8; 1024];
16987        rng.fill_bytes(&mut buf);
16988        let mut unstructured = Unstructured::new(&buf);
16989        Self::arbitrary(&mut unstructured).unwrap_or_default()
16990    }
16991}
16992impl Default for ISBD_LINK_STATUS_DATA {
16993    fn default() -> Self {
16994        Self::DEFAULT.clone()
16995    }
16996}
16997impl MessageData for ISBD_LINK_STATUS_DATA {
16998    type Message = MavMessage;
16999    const ID: u32 = 335u32;
17000    const NAME: &'static str = "ISBD_LINK_STATUS";
17001    const EXTRA_CRC: u8 = 225u8;
17002    const ENCODED_LEN: usize = 24usize;
17003    fn deser(
17004        _version: MavlinkVersion,
17005        __input: &[u8],
17006    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17007        let avail_len = __input.len();
17008        let mut payload_buf = [0; Self::ENCODED_LEN];
17009        let mut buf = if avail_len < Self::ENCODED_LEN {
17010            payload_buf[0..avail_len].copy_from_slice(__input);
17011            Bytes::new(&payload_buf)
17012        } else {
17013            Bytes::new(__input)
17014        };
17015        let mut __struct = Self::default();
17016        __struct.timestamp = buf.get_u64_le()?;
17017        __struct.last_heartbeat = buf.get_u64_le()?;
17018        __struct.failed_sessions = buf.get_u16_le()?;
17019        __struct.successful_sessions = buf.get_u16_le()?;
17020        __struct.signal_quality = buf.get_u8()?;
17021        __struct.ring_pending = buf.get_u8()?;
17022        __struct.tx_session_pending = buf.get_u8()?;
17023        __struct.rx_session_pending = buf.get_u8()?;
17024        Ok(__struct)
17025    }
17026    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17027        let mut __tmp = BytesMut::new(bytes);
17028        #[allow(clippy::absurd_extreme_comparisons)]
17029        #[allow(unused_comparisons)]
17030        if __tmp.remaining() < Self::ENCODED_LEN {
17031            panic!(
17032                "buffer is too small (need {} bytes, but got {})",
17033                Self::ENCODED_LEN,
17034                __tmp.remaining(),
17035            )
17036        }
17037        __tmp.put_u64_le(self.timestamp);
17038        __tmp.put_u64_le(self.last_heartbeat);
17039        __tmp.put_u16_le(self.failed_sessions);
17040        __tmp.put_u16_le(self.successful_sessions);
17041        __tmp.put_u8(self.signal_quality);
17042        __tmp.put_u8(self.ring_pending);
17043        __tmp.put_u8(self.tx_session_pending);
17044        __tmp.put_u8(self.rx_session_pending);
17045        if matches!(version, MavlinkVersion::V2) {
17046            let len = __tmp.len();
17047            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17048        } else {
17049            __tmp.len()
17050        }
17051    }
17052}
17053#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17054#[doc = ""]
17055#[doc = "ID: 149"]
17056#[derive(Debug, Clone, PartialEq)]
17057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17059#[cfg_attr(feature = "ts", derive(TS))]
17060#[cfg_attr(feature = "ts", ts(export))]
17061pub struct LANDING_TARGET_DATA {
17062    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17063    pub time_usec: u64,
17064    #[doc = "X-axis angular offset of the target from the center of the image"]
17065    pub angle_x: f32,
17066    #[doc = "Y-axis angular offset of the target from the center of the image"]
17067    pub angle_y: f32,
17068    #[doc = "Distance to the target from the vehicle"]
17069    pub distance: f32,
17070    #[doc = "Size of target along x-axis"]
17071    pub size_x: f32,
17072    #[doc = "Size of target along y-axis"]
17073    pub size_y: f32,
17074    #[doc = "The ID of the target if multiple targets are present"]
17075    pub target_num: u8,
17076    #[doc = "Coordinate frame used for following fields."]
17077    pub frame: MavFrame,
17078    #[doc = "X Position of the landing target in MAV_FRAME"]
17079    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17080    pub x: f32,
17081    #[doc = "Y Position of the landing target in MAV_FRAME"]
17082    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17083    pub y: f32,
17084    #[doc = "Z Position of the landing target in MAV_FRAME"]
17085    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17086    pub z: f32,
17087    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
17088    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17089    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17090    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17091    pub q: [f32; 4],
17092    #[doc = "Type of landing target"]
17093    #[cfg_attr(feature = "serde", serde(default))]
17094    pub mavtype: LandingTargetType,
17095    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
17096    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17097    pub position_valid: u8,
17098}
17099impl LANDING_TARGET_DATA {
17100    pub const ENCODED_LEN: usize = 60usize;
17101    pub const DEFAULT: Self = Self {
17102        time_usec: 0_u64,
17103        angle_x: 0.0_f32,
17104        angle_y: 0.0_f32,
17105        distance: 0.0_f32,
17106        size_x: 0.0_f32,
17107        size_y: 0.0_f32,
17108        target_num: 0_u8,
17109        frame: MavFrame::DEFAULT,
17110        x: 0.0_f32,
17111        y: 0.0_f32,
17112        z: 0.0_f32,
17113        q: [0.0_f32; 4usize],
17114        mavtype: LandingTargetType::DEFAULT,
17115        position_valid: 0_u8,
17116    };
17117    #[cfg(feature = "arbitrary")]
17118    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17119        use arbitrary::{Arbitrary, Unstructured};
17120        let mut buf = [0u8; 1024];
17121        rng.fill_bytes(&mut buf);
17122        let mut unstructured = Unstructured::new(&buf);
17123        Self::arbitrary(&mut unstructured).unwrap_or_default()
17124    }
17125}
17126impl Default for LANDING_TARGET_DATA {
17127    fn default() -> Self {
17128        Self::DEFAULT.clone()
17129    }
17130}
17131impl MessageData for LANDING_TARGET_DATA {
17132    type Message = MavMessage;
17133    const ID: u32 = 149u32;
17134    const NAME: &'static str = "LANDING_TARGET";
17135    const EXTRA_CRC: u8 = 200u8;
17136    const ENCODED_LEN: usize = 60usize;
17137    fn deser(
17138        _version: MavlinkVersion,
17139        __input: &[u8],
17140    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17141        let avail_len = __input.len();
17142        let mut payload_buf = [0; Self::ENCODED_LEN];
17143        let mut buf = if avail_len < Self::ENCODED_LEN {
17144            payload_buf[0..avail_len].copy_from_slice(__input);
17145            Bytes::new(&payload_buf)
17146        } else {
17147            Bytes::new(__input)
17148        };
17149        let mut __struct = Self::default();
17150        __struct.time_usec = buf.get_u64_le()?;
17151        __struct.angle_x = buf.get_f32_le()?;
17152        __struct.angle_y = buf.get_f32_le()?;
17153        __struct.distance = buf.get_f32_le()?;
17154        __struct.size_x = buf.get_f32_le()?;
17155        __struct.size_y = buf.get_f32_le()?;
17156        __struct.target_num = buf.get_u8()?;
17157        let tmp = buf.get_u8()?;
17158        __struct.frame =
17159            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17160                enum_type: "MavFrame",
17161                value: tmp as u64,
17162            })?;
17163        __struct.x = buf.get_f32_le()?;
17164        __struct.y = buf.get_f32_le()?;
17165        __struct.z = buf.get_f32_le()?;
17166        for v in &mut __struct.q {
17167            let val = buf.get_f32_le()?;
17168            *v = val;
17169        }
17170        let tmp = buf.get_u8()?;
17171        __struct.mavtype =
17172            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17173                enum_type: "LandingTargetType",
17174                value: tmp as u64,
17175            })?;
17176        __struct.position_valid = buf.get_u8()?;
17177        Ok(__struct)
17178    }
17179    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17180        let mut __tmp = BytesMut::new(bytes);
17181        #[allow(clippy::absurd_extreme_comparisons)]
17182        #[allow(unused_comparisons)]
17183        if __tmp.remaining() < Self::ENCODED_LEN {
17184            panic!(
17185                "buffer is too small (need {} bytes, but got {})",
17186                Self::ENCODED_LEN,
17187                __tmp.remaining(),
17188            )
17189        }
17190        __tmp.put_u64_le(self.time_usec);
17191        __tmp.put_f32_le(self.angle_x);
17192        __tmp.put_f32_le(self.angle_y);
17193        __tmp.put_f32_le(self.distance);
17194        __tmp.put_f32_le(self.size_x);
17195        __tmp.put_f32_le(self.size_y);
17196        __tmp.put_u8(self.target_num);
17197        __tmp.put_u8(self.frame as u8);
17198        if matches!(version, MavlinkVersion::V2) {
17199            __tmp.put_f32_le(self.x);
17200            __tmp.put_f32_le(self.y);
17201            __tmp.put_f32_le(self.z);
17202            for val in &self.q {
17203                __tmp.put_f32_le(*val);
17204            }
17205            __tmp.put_u8(self.mavtype as u8);
17206            __tmp.put_u8(self.position_valid);
17207            let len = __tmp.len();
17208            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17209        } else {
17210            __tmp.len()
17211        }
17212    }
17213}
17214#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
17215#[doc = ""]
17216#[doc = "ID: 8"]
17217#[derive(Debug, Clone, PartialEq)]
17218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17219#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17220#[cfg_attr(feature = "ts", derive(TS))]
17221#[cfg_attr(feature = "ts", ts(export))]
17222pub struct LINK_NODE_STATUS_DATA {
17223    #[doc = "Timestamp (time since system boot)."]
17224    pub timestamp: u64,
17225    #[doc = "Transmit rate"]
17226    pub tx_rate: u32,
17227    #[doc = "Receive rate"]
17228    pub rx_rate: u32,
17229    #[doc = "Messages sent"]
17230    pub messages_sent: u32,
17231    #[doc = "Messages received (estimated from counting seq)"]
17232    pub messages_received: u32,
17233    #[doc = "Messages lost (estimated from counting seq)"]
17234    pub messages_lost: u32,
17235    #[doc = "Number of bytes that could not be parsed correctly."]
17236    pub rx_parse_err: u16,
17237    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17238    pub tx_overflows: u16,
17239    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17240    pub rx_overflows: u16,
17241    #[doc = "Remaining free transmit buffer space"]
17242    pub tx_buf: u8,
17243    #[doc = "Remaining free receive buffer space"]
17244    pub rx_buf: u8,
17245}
17246impl LINK_NODE_STATUS_DATA {
17247    pub const ENCODED_LEN: usize = 36usize;
17248    pub const DEFAULT: Self = Self {
17249        timestamp: 0_u64,
17250        tx_rate: 0_u32,
17251        rx_rate: 0_u32,
17252        messages_sent: 0_u32,
17253        messages_received: 0_u32,
17254        messages_lost: 0_u32,
17255        rx_parse_err: 0_u16,
17256        tx_overflows: 0_u16,
17257        rx_overflows: 0_u16,
17258        tx_buf: 0_u8,
17259        rx_buf: 0_u8,
17260    };
17261    #[cfg(feature = "arbitrary")]
17262    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17263        use arbitrary::{Arbitrary, Unstructured};
17264        let mut buf = [0u8; 1024];
17265        rng.fill_bytes(&mut buf);
17266        let mut unstructured = Unstructured::new(&buf);
17267        Self::arbitrary(&mut unstructured).unwrap_or_default()
17268    }
17269}
17270impl Default for LINK_NODE_STATUS_DATA {
17271    fn default() -> Self {
17272        Self::DEFAULT.clone()
17273    }
17274}
17275impl MessageData for LINK_NODE_STATUS_DATA {
17276    type Message = MavMessage;
17277    const ID: u32 = 8u32;
17278    const NAME: &'static str = "LINK_NODE_STATUS";
17279    const EXTRA_CRC: u8 = 117u8;
17280    const ENCODED_LEN: usize = 36usize;
17281    fn deser(
17282        _version: MavlinkVersion,
17283        __input: &[u8],
17284    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17285        let avail_len = __input.len();
17286        let mut payload_buf = [0; Self::ENCODED_LEN];
17287        let mut buf = if avail_len < Self::ENCODED_LEN {
17288            payload_buf[0..avail_len].copy_from_slice(__input);
17289            Bytes::new(&payload_buf)
17290        } else {
17291            Bytes::new(__input)
17292        };
17293        let mut __struct = Self::default();
17294        __struct.timestamp = buf.get_u64_le()?;
17295        __struct.tx_rate = buf.get_u32_le()?;
17296        __struct.rx_rate = buf.get_u32_le()?;
17297        __struct.messages_sent = buf.get_u32_le()?;
17298        __struct.messages_received = buf.get_u32_le()?;
17299        __struct.messages_lost = buf.get_u32_le()?;
17300        __struct.rx_parse_err = buf.get_u16_le()?;
17301        __struct.tx_overflows = buf.get_u16_le()?;
17302        __struct.rx_overflows = buf.get_u16_le()?;
17303        __struct.tx_buf = buf.get_u8()?;
17304        __struct.rx_buf = buf.get_u8()?;
17305        Ok(__struct)
17306    }
17307    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17308        let mut __tmp = BytesMut::new(bytes);
17309        #[allow(clippy::absurd_extreme_comparisons)]
17310        #[allow(unused_comparisons)]
17311        if __tmp.remaining() < Self::ENCODED_LEN {
17312            panic!(
17313                "buffer is too small (need {} bytes, but got {})",
17314                Self::ENCODED_LEN,
17315                __tmp.remaining(),
17316            )
17317        }
17318        __tmp.put_u64_le(self.timestamp);
17319        __tmp.put_u32_le(self.tx_rate);
17320        __tmp.put_u32_le(self.rx_rate);
17321        __tmp.put_u32_le(self.messages_sent);
17322        __tmp.put_u32_le(self.messages_received);
17323        __tmp.put_u32_le(self.messages_lost);
17324        __tmp.put_u16_le(self.rx_parse_err);
17325        __tmp.put_u16_le(self.tx_overflows);
17326        __tmp.put_u16_le(self.rx_overflows);
17327        __tmp.put_u8(self.tx_buf);
17328        __tmp.put_u8(self.rx_buf);
17329        if matches!(version, MavlinkVersion::V2) {
17330            let len = __tmp.len();
17331            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17332        } else {
17333            __tmp.len()
17334        }
17335    }
17336}
17337#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17338#[doc = ""]
17339#[doc = "ID: 32"]
17340#[derive(Debug, Clone, PartialEq)]
17341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17342#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17343#[cfg_attr(feature = "ts", derive(TS))]
17344#[cfg_attr(feature = "ts", ts(export))]
17345pub struct LOCAL_POSITION_NED_DATA {
17346    #[doc = "Timestamp (time since system boot)."]
17347    pub time_boot_ms: u32,
17348    #[doc = "X Position"]
17349    pub x: f32,
17350    #[doc = "Y Position"]
17351    pub y: f32,
17352    #[doc = "Z Position"]
17353    pub z: f32,
17354    #[doc = "X Speed"]
17355    pub vx: f32,
17356    #[doc = "Y Speed"]
17357    pub vy: f32,
17358    #[doc = "Z Speed"]
17359    pub vz: f32,
17360}
17361impl LOCAL_POSITION_NED_DATA {
17362    pub const ENCODED_LEN: usize = 28usize;
17363    pub const DEFAULT: Self = Self {
17364        time_boot_ms: 0_u32,
17365        x: 0.0_f32,
17366        y: 0.0_f32,
17367        z: 0.0_f32,
17368        vx: 0.0_f32,
17369        vy: 0.0_f32,
17370        vz: 0.0_f32,
17371    };
17372    #[cfg(feature = "arbitrary")]
17373    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17374        use arbitrary::{Arbitrary, Unstructured};
17375        let mut buf = [0u8; 1024];
17376        rng.fill_bytes(&mut buf);
17377        let mut unstructured = Unstructured::new(&buf);
17378        Self::arbitrary(&mut unstructured).unwrap_or_default()
17379    }
17380}
17381impl Default for LOCAL_POSITION_NED_DATA {
17382    fn default() -> Self {
17383        Self::DEFAULT.clone()
17384    }
17385}
17386impl MessageData for LOCAL_POSITION_NED_DATA {
17387    type Message = MavMessage;
17388    const ID: u32 = 32u32;
17389    const NAME: &'static str = "LOCAL_POSITION_NED";
17390    const EXTRA_CRC: u8 = 185u8;
17391    const ENCODED_LEN: usize = 28usize;
17392    fn deser(
17393        _version: MavlinkVersion,
17394        __input: &[u8],
17395    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17396        let avail_len = __input.len();
17397        let mut payload_buf = [0; Self::ENCODED_LEN];
17398        let mut buf = if avail_len < Self::ENCODED_LEN {
17399            payload_buf[0..avail_len].copy_from_slice(__input);
17400            Bytes::new(&payload_buf)
17401        } else {
17402            Bytes::new(__input)
17403        };
17404        let mut __struct = Self::default();
17405        __struct.time_boot_ms = buf.get_u32_le()?;
17406        __struct.x = buf.get_f32_le()?;
17407        __struct.y = buf.get_f32_le()?;
17408        __struct.z = buf.get_f32_le()?;
17409        __struct.vx = buf.get_f32_le()?;
17410        __struct.vy = buf.get_f32_le()?;
17411        __struct.vz = buf.get_f32_le()?;
17412        Ok(__struct)
17413    }
17414    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17415        let mut __tmp = BytesMut::new(bytes);
17416        #[allow(clippy::absurd_extreme_comparisons)]
17417        #[allow(unused_comparisons)]
17418        if __tmp.remaining() < Self::ENCODED_LEN {
17419            panic!(
17420                "buffer is too small (need {} bytes, but got {})",
17421                Self::ENCODED_LEN,
17422                __tmp.remaining(),
17423            )
17424        }
17425        __tmp.put_u32_le(self.time_boot_ms);
17426        __tmp.put_f32_le(self.x);
17427        __tmp.put_f32_le(self.y);
17428        __tmp.put_f32_le(self.z);
17429        __tmp.put_f32_le(self.vx);
17430        __tmp.put_f32_le(self.vy);
17431        __tmp.put_f32_le(self.vz);
17432        if matches!(version, MavlinkVersion::V2) {
17433            let len = __tmp.len();
17434            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17435        } else {
17436            __tmp.len()
17437        }
17438    }
17439}
17440#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17441#[doc = ""]
17442#[doc = "ID: 64"]
17443#[derive(Debug, Clone, PartialEq)]
17444#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17445#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17446#[cfg_attr(feature = "ts", derive(TS))]
17447#[cfg_attr(feature = "ts", ts(export))]
17448pub struct LOCAL_POSITION_NED_COV_DATA {
17449    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17450    pub time_usec: u64,
17451    #[doc = "X Position"]
17452    pub x: f32,
17453    #[doc = "Y Position"]
17454    pub y: f32,
17455    #[doc = "Z Position"]
17456    pub z: f32,
17457    #[doc = "X Speed"]
17458    pub vx: f32,
17459    #[doc = "Y Speed"]
17460    pub vy: f32,
17461    #[doc = "Z Speed"]
17462    pub vz: f32,
17463    #[doc = "X Acceleration"]
17464    pub ax: f32,
17465    #[doc = "Y Acceleration"]
17466    pub ay: f32,
17467    #[doc = "Z Acceleration"]
17468    pub az: f32,
17469    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
17470    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17471    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17472    pub covariance: [f32; 45],
17473    #[doc = "Class id of the estimator this estimate originated from."]
17474    pub estimator_type: MavEstimatorType,
17475}
17476impl LOCAL_POSITION_NED_COV_DATA {
17477    pub const ENCODED_LEN: usize = 225usize;
17478    pub const DEFAULT: Self = Self {
17479        time_usec: 0_u64,
17480        x: 0.0_f32,
17481        y: 0.0_f32,
17482        z: 0.0_f32,
17483        vx: 0.0_f32,
17484        vy: 0.0_f32,
17485        vz: 0.0_f32,
17486        ax: 0.0_f32,
17487        ay: 0.0_f32,
17488        az: 0.0_f32,
17489        covariance: [0.0_f32; 45usize],
17490        estimator_type: MavEstimatorType::DEFAULT,
17491    };
17492    #[cfg(feature = "arbitrary")]
17493    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17494        use arbitrary::{Arbitrary, Unstructured};
17495        let mut buf = [0u8; 1024];
17496        rng.fill_bytes(&mut buf);
17497        let mut unstructured = Unstructured::new(&buf);
17498        Self::arbitrary(&mut unstructured).unwrap_or_default()
17499    }
17500}
17501impl Default for LOCAL_POSITION_NED_COV_DATA {
17502    fn default() -> Self {
17503        Self::DEFAULT.clone()
17504    }
17505}
17506impl MessageData for LOCAL_POSITION_NED_COV_DATA {
17507    type Message = MavMessage;
17508    const ID: u32 = 64u32;
17509    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
17510    const EXTRA_CRC: u8 = 191u8;
17511    const ENCODED_LEN: usize = 225usize;
17512    fn deser(
17513        _version: MavlinkVersion,
17514        __input: &[u8],
17515    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17516        let avail_len = __input.len();
17517        let mut payload_buf = [0; Self::ENCODED_LEN];
17518        let mut buf = if avail_len < Self::ENCODED_LEN {
17519            payload_buf[0..avail_len].copy_from_slice(__input);
17520            Bytes::new(&payload_buf)
17521        } else {
17522            Bytes::new(__input)
17523        };
17524        let mut __struct = Self::default();
17525        __struct.time_usec = buf.get_u64_le()?;
17526        __struct.x = buf.get_f32_le()?;
17527        __struct.y = buf.get_f32_le()?;
17528        __struct.z = buf.get_f32_le()?;
17529        __struct.vx = buf.get_f32_le()?;
17530        __struct.vy = buf.get_f32_le()?;
17531        __struct.vz = buf.get_f32_le()?;
17532        __struct.ax = buf.get_f32_le()?;
17533        __struct.ay = buf.get_f32_le()?;
17534        __struct.az = buf.get_f32_le()?;
17535        for v in &mut __struct.covariance {
17536            let val = buf.get_f32_le()?;
17537            *v = val;
17538        }
17539        let tmp = buf.get_u8()?;
17540        __struct.estimator_type =
17541            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17542                enum_type: "MavEstimatorType",
17543                value: tmp as u64,
17544            })?;
17545        Ok(__struct)
17546    }
17547    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17548        let mut __tmp = BytesMut::new(bytes);
17549        #[allow(clippy::absurd_extreme_comparisons)]
17550        #[allow(unused_comparisons)]
17551        if __tmp.remaining() < Self::ENCODED_LEN {
17552            panic!(
17553                "buffer is too small (need {} bytes, but got {})",
17554                Self::ENCODED_LEN,
17555                __tmp.remaining(),
17556            )
17557        }
17558        __tmp.put_u64_le(self.time_usec);
17559        __tmp.put_f32_le(self.x);
17560        __tmp.put_f32_le(self.y);
17561        __tmp.put_f32_le(self.z);
17562        __tmp.put_f32_le(self.vx);
17563        __tmp.put_f32_le(self.vy);
17564        __tmp.put_f32_le(self.vz);
17565        __tmp.put_f32_le(self.ax);
17566        __tmp.put_f32_le(self.ay);
17567        __tmp.put_f32_le(self.az);
17568        for val in &self.covariance {
17569            __tmp.put_f32_le(*val);
17570        }
17571        __tmp.put_u8(self.estimator_type as u8);
17572        if matches!(version, MavlinkVersion::V2) {
17573            let len = __tmp.len();
17574            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17575        } else {
17576            __tmp.len()
17577        }
17578    }
17579}
17580#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17581#[doc = ""]
17582#[doc = "ID: 89"]
17583#[derive(Debug, Clone, PartialEq)]
17584#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17585#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17586#[cfg_attr(feature = "ts", derive(TS))]
17587#[cfg_attr(feature = "ts", ts(export))]
17588pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17589    #[doc = "Timestamp (time since system boot)."]
17590    pub time_boot_ms: u32,
17591    #[doc = "X Position"]
17592    pub x: f32,
17593    #[doc = "Y Position"]
17594    pub y: f32,
17595    #[doc = "Z Position"]
17596    pub z: f32,
17597    #[doc = "Roll"]
17598    pub roll: f32,
17599    #[doc = "Pitch"]
17600    pub pitch: f32,
17601    #[doc = "Yaw"]
17602    pub yaw: f32,
17603}
17604impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17605    pub const ENCODED_LEN: usize = 28usize;
17606    pub const DEFAULT: Self = Self {
17607        time_boot_ms: 0_u32,
17608        x: 0.0_f32,
17609        y: 0.0_f32,
17610        z: 0.0_f32,
17611        roll: 0.0_f32,
17612        pitch: 0.0_f32,
17613        yaw: 0.0_f32,
17614    };
17615    #[cfg(feature = "arbitrary")]
17616    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17617        use arbitrary::{Arbitrary, Unstructured};
17618        let mut buf = [0u8; 1024];
17619        rng.fill_bytes(&mut buf);
17620        let mut unstructured = Unstructured::new(&buf);
17621        Self::arbitrary(&mut unstructured).unwrap_or_default()
17622    }
17623}
17624impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17625    fn default() -> Self {
17626        Self::DEFAULT.clone()
17627    }
17628}
17629impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17630    type Message = MavMessage;
17631    const ID: u32 = 89u32;
17632    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
17633    const EXTRA_CRC: u8 = 231u8;
17634    const ENCODED_LEN: usize = 28usize;
17635    fn deser(
17636        _version: MavlinkVersion,
17637        __input: &[u8],
17638    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17639        let avail_len = __input.len();
17640        let mut payload_buf = [0; Self::ENCODED_LEN];
17641        let mut buf = if avail_len < Self::ENCODED_LEN {
17642            payload_buf[0..avail_len].copy_from_slice(__input);
17643            Bytes::new(&payload_buf)
17644        } else {
17645            Bytes::new(__input)
17646        };
17647        let mut __struct = Self::default();
17648        __struct.time_boot_ms = buf.get_u32_le()?;
17649        __struct.x = buf.get_f32_le()?;
17650        __struct.y = buf.get_f32_le()?;
17651        __struct.z = buf.get_f32_le()?;
17652        __struct.roll = buf.get_f32_le()?;
17653        __struct.pitch = buf.get_f32_le()?;
17654        __struct.yaw = buf.get_f32_le()?;
17655        Ok(__struct)
17656    }
17657    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17658        let mut __tmp = BytesMut::new(bytes);
17659        #[allow(clippy::absurd_extreme_comparisons)]
17660        #[allow(unused_comparisons)]
17661        if __tmp.remaining() < Self::ENCODED_LEN {
17662            panic!(
17663                "buffer is too small (need {} bytes, but got {})",
17664                Self::ENCODED_LEN,
17665                __tmp.remaining(),
17666            )
17667        }
17668        __tmp.put_u32_le(self.time_boot_ms);
17669        __tmp.put_f32_le(self.x);
17670        __tmp.put_f32_le(self.y);
17671        __tmp.put_f32_le(self.z);
17672        __tmp.put_f32_le(self.roll);
17673        __tmp.put_f32_le(self.pitch);
17674        __tmp.put_f32_le(self.yaw);
17675        if matches!(version, MavlinkVersion::V2) {
17676            let len = __tmp.len();
17677            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17678        } else {
17679            __tmp.len()
17680        }
17681    }
17682}
17683#[doc = "An ack for a LOGGING_DATA_ACKED message."]
17684#[doc = ""]
17685#[doc = "ID: 268"]
17686#[derive(Debug, Clone, PartialEq)]
17687#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17688#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17689#[cfg_attr(feature = "ts", derive(TS))]
17690#[cfg_attr(feature = "ts", ts(export))]
17691pub struct LOGGING_ACK_DATA {
17692    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
17693    pub sequence: u16,
17694    #[doc = "system ID of the target"]
17695    pub target_system: u8,
17696    #[doc = "component ID of the target"]
17697    pub target_component: u8,
17698}
17699impl LOGGING_ACK_DATA {
17700    pub const ENCODED_LEN: usize = 4usize;
17701    pub const DEFAULT: Self = Self {
17702        sequence: 0_u16,
17703        target_system: 0_u8,
17704        target_component: 0_u8,
17705    };
17706    #[cfg(feature = "arbitrary")]
17707    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17708        use arbitrary::{Arbitrary, Unstructured};
17709        let mut buf = [0u8; 1024];
17710        rng.fill_bytes(&mut buf);
17711        let mut unstructured = Unstructured::new(&buf);
17712        Self::arbitrary(&mut unstructured).unwrap_or_default()
17713    }
17714}
17715impl Default for LOGGING_ACK_DATA {
17716    fn default() -> Self {
17717        Self::DEFAULT.clone()
17718    }
17719}
17720impl MessageData for LOGGING_ACK_DATA {
17721    type Message = MavMessage;
17722    const ID: u32 = 268u32;
17723    const NAME: &'static str = "LOGGING_ACK";
17724    const EXTRA_CRC: u8 = 14u8;
17725    const ENCODED_LEN: usize = 4usize;
17726    fn deser(
17727        _version: MavlinkVersion,
17728        __input: &[u8],
17729    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17730        let avail_len = __input.len();
17731        let mut payload_buf = [0; Self::ENCODED_LEN];
17732        let mut buf = if avail_len < Self::ENCODED_LEN {
17733            payload_buf[0..avail_len].copy_from_slice(__input);
17734            Bytes::new(&payload_buf)
17735        } else {
17736            Bytes::new(__input)
17737        };
17738        let mut __struct = Self::default();
17739        __struct.sequence = buf.get_u16_le()?;
17740        __struct.target_system = buf.get_u8()?;
17741        __struct.target_component = buf.get_u8()?;
17742        Ok(__struct)
17743    }
17744    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17745        let mut __tmp = BytesMut::new(bytes);
17746        #[allow(clippy::absurd_extreme_comparisons)]
17747        #[allow(unused_comparisons)]
17748        if __tmp.remaining() < Self::ENCODED_LEN {
17749            panic!(
17750                "buffer is too small (need {} bytes, but got {})",
17751                Self::ENCODED_LEN,
17752                __tmp.remaining(),
17753            )
17754        }
17755        __tmp.put_u16_le(self.sequence);
17756        __tmp.put_u8(self.target_system);
17757        __tmp.put_u8(self.target_component);
17758        if matches!(version, MavlinkVersion::V2) {
17759            let len = __tmp.len();
17760            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17761        } else {
17762            __tmp.len()
17763        }
17764    }
17765}
17766#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
17767#[doc = ""]
17768#[doc = "ID: 266"]
17769#[derive(Debug, Clone, PartialEq)]
17770#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17771#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17772#[cfg_attr(feature = "ts", derive(TS))]
17773#[cfg_attr(feature = "ts", ts(export))]
17774pub struct LOGGING_DATA_DATA {
17775    #[doc = "sequence number (can wrap)"]
17776    pub sequence: u16,
17777    #[doc = "system ID of the target"]
17778    pub target_system: u8,
17779    #[doc = "component ID of the target"]
17780    pub target_component: u8,
17781    #[doc = "data length"]
17782    pub length: u8,
17783    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17784    pub first_message_offset: u8,
17785    #[doc = "logged data"]
17786    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17787    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17788    pub data: [u8; 249],
17789}
17790impl LOGGING_DATA_DATA {
17791    pub const ENCODED_LEN: usize = 255usize;
17792    pub const DEFAULT: Self = Self {
17793        sequence: 0_u16,
17794        target_system: 0_u8,
17795        target_component: 0_u8,
17796        length: 0_u8,
17797        first_message_offset: 0_u8,
17798        data: [0_u8; 249usize],
17799    };
17800    #[cfg(feature = "arbitrary")]
17801    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17802        use arbitrary::{Arbitrary, Unstructured};
17803        let mut buf = [0u8; 1024];
17804        rng.fill_bytes(&mut buf);
17805        let mut unstructured = Unstructured::new(&buf);
17806        Self::arbitrary(&mut unstructured).unwrap_or_default()
17807    }
17808}
17809impl Default for LOGGING_DATA_DATA {
17810    fn default() -> Self {
17811        Self::DEFAULT.clone()
17812    }
17813}
17814impl MessageData for LOGGING_DATA_DATA {
17815    type Message = MavMessage;
17816    const ID: u32 = 266u32;
17817    const NAME: &'static str = "LOGGING_DATA";
17818    const EXTRA_CRC: u8 = 193u8;
17819    const ENCODED_LEN: usize = 255usize;
17820    fn deser(
17821        _version: MavlinkVersion,
17822        __input: &[u8],
17823    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17824        let avail_len = __input.len();
17825        let mut payload_buf = [0; Self::ENCODED_LEN];
17826        let mut buf = if avail_len < Self::ENCODED_LEN {
17827            payload_buf[0..avail_len].copy_from_slice(__input);
17828            Bytes::new(&payload_buf)
17829        } else {
17830            Bytes::new(__input)
17831        };
17832        let mut __struct = Self::default();
17833        __struct.sequence = buf.get_u16_le()?;
17834        __struct.target_system = buf.get_u8()?;
17835        __struct.target_component = buf.get_u8()?;
17836        __struct.length = buf.get_u8()?;
17837        __struct.first_message_offset = buf.get_u8()?;
17838        for v in &mut __struct.data {
17839            let val = buf.get_u8()?;
17840            *v = val;
17841        }
17842        Ok(__struct)
17843    }
17844    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17845        let mut __tmp = BytesMut::new(bytes);
17846        #[allow(clippy::absurd_extreme_comparisons)]
17847        #[allow(unused_comparisons)]
17848        if __tmp.remaining() < Self::ENCODED_LEN {
17849            panic!(
17850                "buffer is too small (need {} bytes, but got {})",
17851                Self::ENCODED_LEN,
17852                __tmp.remaining(),
17853            )
17854        }
17855        __tmp.put_u16_le(self.sequence);
17856        __tmp.put_u8(self.target_system);
17857        __tmp.put_u8(self.target_component);
17858        __tmp.put_u8(self.length);
17859        __tmp.put_u8(self.first_message_offset);
17860        for val in &self.data {
17861            __tmp.put_u8(*val);
17862        }
17863        if matches!(version, MavlinkVersion::V2) {
17864            let len = __tmp.len();
17865            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17866        } else {
17867            __tmp.len()
17868        }
17869    }
17870}
17871#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
17872#[doc = ""]
17873#[doc = "ID: 267"]
17874#[derive(Debug, Clone, PartialEq)]
17875#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17877#[cfg_attr(feature = "ts", derive(TS))]
17878#[cfg_attr(feature = "ts", ts(export))]
17879pub struct LOGGING_DATA_ACKED_DATA {
17880    #[doc = "sequence number (can wrap)"]
17881    pub sequence: u16,
17882    #[doc = "system ID of the target"]
17883    pub target_system: u8,
17884    #[doc = "component ID of the target"]
17885    pub target_component: u8,
17886    #[doc = "data length"]
17887    pub length: u8,
17888    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17889    pub first_message_offset: u8,
17890    #[doc = "logged data"]
17891    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17892    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17893    pub data: [u8; 249],
17894}
17895impl LOGGING_DATA_ACKED_DATA {
17896    pub const ENCODED_LEN: usize = 255usize;
17897    pub const DEFAULT: Self = Self {
17898        sequence: 0_u16,
17899        target_system: 0_u8,
17900        target_component: 0_u8,
17901        length: 0_u8,
17902        first_message_offset: 0_u8,
17903        data: [0_u8; 249usize],
17904    };
17905    #[cfg(feature = "arbitrary")]
17906    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17907        use arbitrary::{Arbitrary, Unstructured};
17908        let mut buf = [0u8; 1024];
17909        rng.fill_bytes(&mut buf);
17910        let mut unstructured = Unstructured::new(&buf);
17911        Self::arbitrary(&mut unstructured).unwrap_or_default()
17912    }
17913}
17914impl Default for LOGGING_DATA_ACKED_DATA {
17915    fn default() -> Self {
17916        Self::DEFAULT.clone()
17917    }
17918}
17919impl MessageData for LOGGING_DATA_ACKED_DATA {
17920    type Message = MavMessage;
17921    const ID: u32 = 267u32;
17922    const NAME: &'static str = "LOGGING_DATA_ACKED";
17923    const EXTRA_CRC: u8 = 35u8;
17924    const ENCODED_LEN: usize = 255usize;
17925    fn deser(
17926        _version: MavlinkVersion,
17927        __input: &[u8],
17928    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17929        let avail_len = __input.len();
17930        let mut payload_buf = [0; Self::ENCODED_LEN];
17931        let mut buf = if avail_len < Self::ENCODED_LEN {
17932            payload_buf[0..avail_len].copy_from_slice(__input);
17933            Bytes::new(&payload_buf)
17934        } else {
17935            Bytes::new(__input)
17936        };
17937        let mut __struct = Self::default();
17938        __struct.sequence = buf.get_u16_le()?;
17939        __struct.target_system = buf.get_u8()?;
17940        __struct.target_component = buf.get_u8()?;
17941        __struct.length = buf.get_u8()?;
17942        __struct.first_message_offset = buf.get_u8()?;
17943        for v in &mut __struct.data {
17944            let val = buf.get_u8()?;
17945            *v = val;
17946        }
17947        Ok(__struct)
17948    }
17949    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17950        let mut __tmp = BytesMut::new(bytes);
17951        #[allow(clippy::absurd_extreme_comparisons)]
17952        #[allow(unused_comparisons)]
17953        if __tmp.remaining() < Self::ENCODED_LEN {
17954            panic!(
17955                "buffer is too small (need {} bytes, but got {})",
17956                Self::ENCODED_LEN,
17957                __tmp.remaining(),
17958            )
17959        }
17960        __tmp.put_u16_le(self.sequence);
17961        __tmp.put_u8(self.target_system);
17962        __tmp.put_u8(self.target_component);
17963        __tmp.put_u8(self.length);
17964        __tmp.put_u8(self.first_message_offset);
17965        for val in &self.data {
17966            __tmp.put_u8(*val);
17967        }
17968        if matches!(version, MavlinkVersion::V2) {
17969            let len = __tmp.len();
17970            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17971        } else {
17972            __tmp.len()
17973        }
17974    }
17975}
17976#[doc = "Reply to LOG_REQUEST_DATA."]
17977#[doc = ""]
17978#[doc = "ID: 120"]
17979#[derive(Debug, Clone, PartialEq)]
17980#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17981#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17982#[cfg_attr(feature = "ts", derive(TS))]
17983#[cfg_attr(feature = "ts", ts(export))]
17984pub struct LOG_DATA_DATA {
17985    #[doc = "Offset into the log"]
17986    pub ofs: u32,
17987    #[doc = "Log id (from LOG_ENTRY reply)"]
17988    pub id: u16,
17989    #[doc = "Number of bytes (zero for end of log)"]
17990    pub count: u8,
17991    #[doc = "log data"]
17992    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17993    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17994    pub data: [u8; 90],
17995}
17996impl LOG_DATA_DATA {
17997    pub const ENCODED_LEN: usize = 97usize;
17998    pub const DEFAULT: Self = Self {
17999        ofs: 0_u32,
18000        id: 0_u16,
18001        count: 0_u8,
18002        data: [0_u8; 90usize],
18003    };
18004    #[cfg(feature = "arbitrary")]
18005    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18006        use arbitrary::{Arbitrary, Unstructured};
18007        let mut buf = [0u8; 1024];
18008        rng.fill_bytes(&mut buf);
18009        let mut unstructured = Unstructured::new(&buf);
18010        Self::arbitrary(&mut unstructured).unwrap_or_default()
18011    }
18012}
18013impl Default for LOG_DATA_DATA {
18014    fn default() -> Self {
18015        Self::DEFAULT.clone()
18016    }
18017}
18018impl MessageData for LOG_DATA_DATA {
18019    type Message = MavMessage;
18020    const ID: u32 = 120u32;
18021    const NAME: &'static str = "LOG_DATA";
18022    const EXTRA_CRC: u8 = 134u8;
18023    const ENCODED_LEN: usize = 97usize;
18024    fn deser(
18025        _version: MavlinkVersion,
18026        __input: &[u8],
18027    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18028        let avail_len = __input.len();
18029        let mut payload_buf = [0; Self::ENCODED_LEN];
18030        let mut buf = if avail_len < Self::ENCODED_LEN {
18031            payload_buf[0..avail_len].copy_from_slice(__input);
18032            Bytes::new(&payload_buf)
18033        } else {
18034            Bytes::new(__input)
18035        };
18036        let mut __struct = Self::default();
18037        __struct.ofs = buf.get_u32_le()?;
18038        __struct.id = buf.get_u16_le()?;
18039        __struct.count = buf.get_u8()?;
18040        for v in &mut __struct.data {
18041            let val = buf.get_u8()?;
18042            *v = val;
18043        }
18044        Ok(__struct)
18045    }
18046    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18047        let mut __tmp = BytesMut::new(bytes);
18048        #[allow(clippy::absurd_extreme_comparisons)]
18049        #[allow(unused_comparisons)]
18050        if __tmp.remaining() < Self::ENCODED_LEN {
18051            panic!(
18052                "buffer is too small (need {} bytes, but got {})",
18053                Self::ENCODED_LEN,
18054                __tmp.remaining(),
18055            )
18056        }
18057        __tmp.put_u32_le(self.ofs);
18058        __tmp.put_u16_le(self.id);
18059        __tmp.put_u8(self.count);
18060        for val in &self.data {
18061            __tmp.put_u8(*val);
18062        }
18063        if matches!(version, MavlinkVersion::V2) {
18064            let len = __tmp.len();
18065            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18066        } else {
18067            __tmp.len()
18068        }
18069    }
18070}
18071#[doc = "Reply to LOG_REQUEST_LIST."]
18072#[doc = ""]
18073#[doc = "ID: 118"]
18074#[derive(Debug, Clone, PartialEq)]
18075#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18076#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18077#[cfg_attr(feature = "ts", derive(TS))]
18078#[cfg_attr(feature = "ts", ts(export))]
18079pub struct LOG_ENTRY_DATA {
18080    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
18081    pub time_utc: u32,
18082    #[doc = "Size of the log (may be approximate)"]
18083    pub size: u32,
18084    #[doc = "Log id"]
18085    pub id: u16,
18086    #[doc = "Total number of logs"]
18087    pub num_logs: u16,
18088    #[doc = "High log number"]
18089    pub last_log_num: u16,
18090}
18091impl LOG_ENTRY_DATA {
18092    pub const ENCODED_LEN: usize = 14usize;
18093    pub const DEFAULT: Self = Self {
18094        time_utc: 0_u32,
18095        size: 0_u32,
18096        id: 0_u16,
18097        num_logs: 0_u16,
18098        last_log_num: 0_u16,
18099    };
18100    #[cfg(feature = "arbitrary")]
18101    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18102        use arbitrary::{Arbitrary, Unstructured};
18103        let mut buf = [0u8; 1024];
18104        rng.fill_bytes(&mut buf);
18105        let mut unstructured = Unstructured::new(&buf);
18106        Self::arbitrary(&mut unstructured).unwrap_or_default()
18107    }
18108}
18109impl Default for LOG_ENTRY_DATA {
18110    fn default() -> Self {
18111        Self::DEFAULT.clone()
18112    }
18113}
18114impl MessageData for LOG_ENTRY_DATA {
18115    type Message = MavMessage;
18116    const ID: u32 = 118u32;
18117    const NAME: &'static str = "LOG_ENTRY";
18118    const EXTRA_CRC: u8 = 56u8;
18119    const ENCODED_LEN: usize = 14usize;
18120    fn deser(
18121        _version: MavlinkVersion,
18122        __input: &[u8],
18123    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18124        let avail_len = __input.len();
18125        let mut payload_buf = [0; Self::ENCODED_LEN];
18126        let mut buf = if avail_len < Self::ENCODED_LEN {
18127            payload_buf[0..avail_len].copy_from_slice(__input);
18128            Bytes::new(&payload_buf)
18129        } else {
18130            Bytes::new(__input)
18131        };
18132        let mut __struct = Self::default();
18133        __struct.time_utc = buf.get_u32_le()?;
18134        __struct.size = buf.get_u32_le()?;
18135        __struct.id = buf.get_u16_le()?;
18136        __struct.num_logs = buf.get_u16_le()?;
18137        __struct.last_log_num = buf.get_u16_le()?;
18138        Ok(__struct)
18139    }
18140    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18141        let mut __tmp = BytesMut::new(bytes);
18142        #[allow(clippy::absurd_extreme_comparisons)]
18143        #[allow(unused_comparisons)]
18144        if __tmp.remaining() < Self::ENCODED_LEN {
18145            panic!(
18146                "buffer is too small (need {} bytes, but got {})",
18147                Self::ENCODED_LEN,
18148                __tmp.remaining(),
18149            )
18150        }
18151        __tmp.put_u32_le(self.time_utc);
18152        __tmp.put_u32_le(self.size);
18153        __tmp.put_u16_le(self.id);
18154        __tmp.put_u16_le(self.num_logs);
18155        __tmp.put_u16_le(self.last_log_num);
18156        if matches!(version, MavlinkVersion::V2) {
18157            let len = __tmp.len();
18158            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18159        } else {
18160            __tmp.len()
18161        }
18162    }
18163}
18164#[doc = "Erase all logs."]
18165#[doc = ""]
18166#[doc = "ID: 121"]
18167#[derive(Debug, Clone, PartialEq)]
18168#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18169#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18170#[cfg_attr(feature = "ts", derive(TS))]
18171#[cfg_attr(feature = "ts", ts(export))]
18172pub struct LOG_ERASE_DATA {
18173    #[doc = "System ID"]
18174    pub target_system: u8,
18175    #[doc = "Component ID"]
18176    pub target_component: u8,
18177}
18178impl LOG_ERASE_DATA {
18179    pub const ENCODED_LEN: usize = 2usize;
18180    pub const DEFAULT: Self = Self {
18181        target_system: 0_u8,
18182        target_component: 0_u8,
18183    };
18184    #[cfg(feature = "arbitrary")]
18185    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18186        use arbitrary::{Arbitrary, Unstructured};
18187        let mut buf = [0u8; 1024];
18188        rng.fill_bytes(&mut buf);
18189        let mut unstructured = Unstructured::new(&buf);
18190        Self::arbitrary(&mut unstructured).unwrap_or_default()
18191    }
18192}
18193impl Default for LOG_ERASE_DATA {
18194    fn default() -> Self {
18195        Self::DEFAULT.clone()
18196    }
18197}
18198impl MessageData for LOG_ERASE_DATA {
18199    type Message = MavMessage;
18200    const ID: u32 = 121u32;
18201    const NAME: &'static str = "LOG_ERASE";
18202    const EXTRA_CRC: u8 = 237u8;
18203    const ENCODED_LEN: usize = 2usize;
18204    fn deser(
18205        _version: MavlinkVersion,
18206        __input: &[u8],
18207    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18208        let avail_len = __input.len();
18209        let mut payload_buf = [0; Self::ENCODED_LEN];
18210        let mut buf = if avail_len < Self::ENCODED_LEN {
18211            payload_buf[0..avail_len].copy_from_slice(__input);
18212            Bytes::new(&payload_buf)
18213        } else {
18214            Bytes::new(__input)
18215        };
18216        let mut __struct = Self::default();
18217        __struct.target_system = buf.get_u8()?;
18218        __struct.target_component = buf.get_u8()?;
18219        Ok(__struct)
18220    }
18221    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18222        let mut __tmp = BytesMut::new(bytes);
18223        #[allow(clippy::absurd_extreme_comparisons)]
18224        #[allow(unused_comparisons)]
18225        if __tmp.remaining() < Self::ENCODED_LEN {
18226            panic!(
18227                "buffer is too small (need {} bytes, but got {})",
18228                Self::ENCODED_LEN,
18229                __tmp.remaining(),
18230            )
18231        }
18232        __tmp.put_u8(self.target_system);
18233        __tmp.put_u8(self.target_component);
18234        if matches!(version, MavlinkVersion::V2) {
18235            let len = __tmp.len();
18236            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18237        } else {
18238            __tmp.len()
18239        }
18240    }
18241}
18242#[doc = "Request a chunk of a log."]
18243#[doc = ""]
18244#[doc = "ID: 119"]
18245#[derive(Debug, Clone, PartialEq)]
18246#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18248#[cfg_attr(feature = "ts", derive(TS))]
18249#[cfg_attr(feature = "ts", ts(export))]
18250pub struct LOG_REQUEST_DATA_DATA {
18251    #[doc = "Offset into the log"]
18252    pub ofs: u32,
18253    #[doc = "Number of bytes"]
18254    pub count: u32,
18255    #[doc = "Log id (from LOG_ENTRY reply)"]
18256    pub id: u16,
18257    #[doc = "System ID"]
18258    pub target_system: u8,
18259    #[doc = "Component ID"]
18260    pub target_component: u8,
18261}
18262impl LOG_REQUEST_DATA_DATA {
18263    pub const ENCODED_LEN: usize = 12usize;
18264    pub const DEFAULT: Self = Self {
18265        ofs: 0_u32,
18266        count: 0_u32,
18267        id: 0_u16,
18268        target_system: 0_u8,
18269        target_component: 0_u8,
18270    };
18271    #[cfg(feature = "arbitrary")]
18272    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18273        use arbitrary::{Arbitrary, Unstructured};
18274        let mut buf = [0u8; 1024];
18275        rng.fill_bytes(&mut buf);
18276        let mut unstructured = Unstructured::new(&buf);
18277        Self::arbitrary(&mut unstructured).unwrap_or_default()
18278    }
18279}
18280impl Default for LOG_REQUEST_DATA_DATA {
18281    fn default() -> Self {
18282        Self::DEFAULT.clone()
18283    }
18284}
18285impl MessageData for LOG_REQUEST_DATA_DATA {
18286    type Message = MavMessage;
18287    const ID: u32 = 119u32;
18288    const NAME: &'static str = "LOG_REQUEST_DATA";
18289    const EXTRA_CRC: u8 = 116u8;
18290    const ENCODED_LEN: usize = 12usize;
18291    fn deser(
18292        _version: MavlinkVersion,
18293        __input: &[u8],
18294    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18295        let avail_len = __input.len();
18296        let mut payload_buf = [0; Self::ENCODED_LEN];
18297        let mut buf = if avail_len < Self::ENCODED_LEN {
18298            payload_buf[0..avail_len].copy_from_slice(__input);
18299            Bytes::new(&payload_buf)
18300        } else {
18301            Bytes::new(__input)
18302        };
18303        let mut __struct = Self::default();
18304        __struct.ofs = buf.get_u32_le()?;
18305        __struct.count = buf.get_u32_le()?;
18306        __struct.id = buf.get_u16_le()?;
18307        __struct.target_system = buf.get_u8()?;
18308        __struct.target_component = buf.get_u8()?;
18309        Ok(__struct)
18310    }
18311    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18312        let mut __tmp = BytesMut::new(bytes);
18313        #[allow(clippy::absurd_extreme_comparisons)]
18314        #[allow(unused_comparisons)]
18315        if __tmp.remaining() < Self::ENCODED_LEN {
18316            panic!(
18317                "buffer is too small (need {} bytes, but got {})",
18318                Self::ENCODED_LEN,
18319                __tmp.remaining(),
18320            )
18321        }
18322        __tmp.put_u32_le(self.ofs);
18323        __tmp.put_u32_le(self.count);
18324        __tmp.put_u16_le(self.id);
18325        __tmp.put_u8(self.target_system);
18326        __tmp.put_u8(self.target_component);
18327        if matches!(version, MavlinkVersion::V2) {
18328            let len = __tmp.len();
18329            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18330        } else {
18331            __tmp.len()
18332        }
18333    }
18334}
18335#[doc = "Stop log transfer and resume normal logging."]
18336#[doc = ""]
18337#[doc = "ID: 122"]
18338#[derive(Debug, Clone, PartialEq)]
18339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18340#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18341#[cfg_attr(feature = "ts", derive(TS))]
18342#[cfg_attr(feature = "ts", ts(export))]
18343pub struct LOG_REQUEST_END_DATA {
18344    #[doc = "System ID"]
18345    pub target_system: u8,
18346    #[doc = "Component ID"]
18347    pub target_component: u8,
18348}
18349impl LOG_REQUEST_END_DATA {
18350    pub const ENCODED_LEN: usize = 2usize;
18351    pub const DEFAULT: Self = Self {
18352        target_system: 0_u8,
18353        target_component: 0_u8,
18354    };
18355    #[cfg(feature = "arbitrary")]
18356    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18357        use arbitrary::{Arbitrary, Unstructured};
18358        let mut buf = [0u8; 1024];
18359        rng.fill_bytes(&mut buf);
18360        let mut unstructured = Unstructured::new(&buf);
18361        Self::arbitrary(&mut unstructured).unwrap_or_default()
18362    }
18363}
18364impl Default for LOG_REQUEST_END_DATA {
18365    fn default() -> Self {
18366        Self::DEFAULT.clone()
18367    }
18368}
18369impl MessageData for LOG_REQUEST_END_DATA {
18370    type Message = MavMessage;
18371    const ID: u32 = 122u32;
18372    const NAME: &'static str = "LOG_REQUEST_END";
18373    const EXTRA_CRC: u8 = 203u8;
18374    const ENCODED_LEN: usize = 2usize;
18375    fn deser(
18376        _version: MavlinkVersion,
18377        __input: &[u8],
18378    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18379        let avail_len = __input.len();
18380        let mut payload_buf = [0; Self::ENCODED_LEN];
18381        let mut buf = if avail_len < Self::ENCODED_LEN {
18382            payload_buf[0..avail_len].copy_from_slice(__input);
18383            Bytes::new(&payload_buf)
18384        } else {
18385            Bytes::new(__input)
18386        };
18387        let mut __struct = Self::default();
18388        __struct.target_system = buf.get_u8()?;
18389        __struct.target_component = buf.get_u8()?;
18390        Ok(__struct)
18391    }
18392    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18393        let mut __tmp = BytesMut::new(bytes);
18394        #[allow(clippy::absurd_extreme_comparisons)]
18395        #[allow(unused_comparisons)]
18396        if __tmp.remaining() < Self::ENCODED_LEN {
18397            panic!(
18398                "buffer is too small (need {} bytes, but got {})",
18399                Self::ENCODED_LEN,
18400                __tmp.remaining(),
18401            )
18402        }
18403        __tmp.put_u8(self.target_system);
18404        __tmp.put_u8(self.target_component);
18405        if matches!(version, MavlinkVersion::V2) {
18406            let len = __tmp.len();
18407            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18408        } else {
18409            __tmp.len()
18410        }
18411    }
18412}
18413#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
18414#[doc = ""]
18415#[doc = "ID: 117"]
18416#[derive(Debug, Clone, PartialEq)]
18417#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18418#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18419#[cfg_attr(feature = "ts", derive(TS))]
18420#[cfg_attr(feature = "ts", ts(export))]
18421pub struct LOG_REQUEST_LIST_DATA {
18422    #[doc = "First log id (0 for first available)"]
18423    pub start: u16,
18424    #[doc = "Last log id (0xffff for last available)"]
18425    pub end: u16,
18426    #[doc = "System ID"]
18427    pub target_system: u8,
18428    #[doc = "Component ID"]
18429    pub target_component: u8,
18430}
18431impl LOG_REQUEST_LIST_DATA {
18432    pub const ENCODED_LEN: usize = 6usize;
18433    pub const DEFAULT: Self = Self {
18434        start: 0_u16,
18435        end: 0_u16,
18436        target_system: 0_u8,
18437        target_component: 0_u8,
18438    };
18439    #[cfg(feature = "arbitrary")]
18440    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18441        use arbitrary::{Arbitrary, Unstructured};
18442        let mut buf = [0u8; 1024];
18443        rng.fill_bytes(&mut buf);
18444        let mut unstructured = Unstructured::new(&buf);
18445        Self::arbitrary(&mut unstructured).unwrap_or_default()
18446    }
18447}
18448impl Default for LOG_REQUEST_LIST_DATA {
18449    fn default() -> Self {
18450        Self::DEFAULT.clone()
18451    }
18452}
18453impl MessageData for LOG_REQUEST_LIST_DATA {
18454    type Message = MavMessage;
18455    const ID: u32 = 117u32;
18456    const NAME: &'static str = "LOG_REQUEST_LIST";
18457    const EXTRA_CRC: u8 = 128u8;
18458    const ENCODED_LEN: usize = 6usize;
18459    fn deser(
18460        _version: MavlinkVersion,
18461        __input: &[u8],
18462    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18463        let avail_len = __input.len();
18464        let mut payload_buf = [0; Self::ENCODED_LEN];
18465        let mut buf = if avail_len < Self::ENCODED_LEN {
18466            payload_buf[0..avail_len].copy_from_slice(__input);
18467            Bytes::new(&payload_buf)
18468        } else {
18469            Bytes::new(__input)
18470        };
18471        let mut __struct = Self::default();
18472        __struct.start = buf.get_u16_le()?;
18473        __struct.end = buf.get_u16_le()?;
18474        __struct.target_system = buf.get_u8()?;
18475        __struct.target_component = buf.get_u8()?;
18476        Ok(__struct)
18477    }
18478    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18479        let mut __tmp = BytesMut::new(bytes);
18480        #[allow(clippy::absurd_extreme_comparisons)]
18481        #[allow(unused_comparisons)]
18482        if __tmp.remaining() < Self::ENCODED_LEN {
18483            panic!(
18484                "buffer is too small (need {} bytes, but got {})",
18485                Self::ENCODED_LEN,
18486                __tmp.remaining(),
18487            )
18488        }
18489        __tmp.put_u16_le(self.start);
18490        __tmp.put_u16_le(self.end);
18491        __tmp.put_u8(self.target_system);
18492        __tmp.put_u8(self.target_component);
18493        if matches!(version, MavlinkVersion::V2) {
18494            let len = __tmp.len();
18495            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18496        } else {
18497            __tmp.len()
18498        }
18499    }
18500}
18501#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
18502#[doc = ""]
18503#[doc = "ID: 192"]
18504#[derive(Debug, Clone, PartialEq)]
18505#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18506#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18507#[cfg_attr(feature = "ts", derive(TS))]
18508#[cfg_attr(feature = "ts", ts(export))]
18509pub struct MAG_CAL_REPORT_DATA {
18510    #[doc = "RMS milligauss residuals."]
18511    pub fitness: f32,
18512    #[doc = "X offset."]
18513    pub ofs_x: f32,
18514    #[doc = "Y offset."]
18515    pub ofs_y: f32,
18516    #[doc = "Z offset."]
18517    pub ofs_z: f32,
18518    #[doc = "X diagonal (matrix 11)."]
18519    pub diag_x: f32,
18520    #[doc = "Y diagonal (matrix 22)."]
18521    pub diag_y: f32,
18522    #[doc = "Z diagonal (matrix 33)."]
18523    pub diag_z: f32,
18524    #[doc = "X off-diagonal (matrix 12 and 21)."]
18525    pub offdiag_x: f32,
18526    #[doc = "Y off-diagonal (matrix 13 and 31)."]
18527    pub offdiag_y: f32,
18528    #[doc = "Z off-diagonal (matrix 32 and 23)."]
18529    pub offdiag_z: f32,
18530    #[doc = "Compass being calibrated."]
18531    pub compass_id: u8,
18532    #[doc = "Bitmask of compasses being calibrated."]
18533    pub cal_mask: u8,
18534    #[doc = "Calibration Status."]
18535    pub cal_status: MagCalStatus,
18536    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
18537    pub autosaved: u8,
18538    #[doc = "Confidence in orientation (higher is better)."]
18539    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18540    pub orientation_confidence: f32,
18541    #[doc = "orientation before calibration."]
18542    #[cfg_attr(feature = "serde", serde(default))]
18543    pub old_orientation: MavSensorOrientation,
18544    #[doc = "orientation after calibration."]
18545    #[cfg_attr(feature = "serde", serde(default))]
18546    pub new_orientation: MavSensorOrientation,
18547    #[doc = "field radius correction factor"]
18548    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18549    pub scale_factor: f32,
18550}
18551impl MAG_CAL_REPORT_DATA {
18552    pub const ENCODED_LEN: usize = 54usize;
18553    pub const DEFAULT: Self = Self {
18554        fitness: 0.0_f32,
18555        ofs_x: 0.0_f32,
18556        ofs_y: 0.0_f32,
18557        ofs_z: 0.0_f32,
18558        diag_x: 0.0_f32,
18559        diag_y: 0.0_f32,
18560        diag_z: 0.0_f32,
18561        offdiag_x: 0.0_f32,
18562        offdiag_y: 0.0_f32,
18563        offdiag_z: 0.0_f32,
18564        compass_id: 0_u8,
18565        cal_mask: 0_u8,
18566        cal_status: MagCalStatus::DEFAULT,
18567        autosaved: 0_u8,
18568        orientation_confidence: 0.0_f32,
18569        old_orientation: MavSensorOrientation::DEFAULT,
18570        new_orientation: MavSensorOrientation::DEFAULT,
18571        scale_factor: 0.0_f32,
18572    };
18573    #[cfg(feature = "arbitrary")]
18574    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18575        use arbitrary::{Arbitrary, Unstructured};
18576        let mut buf = [0u8; 1024];
18577        rng.fill_bytes(&mut buf);
18578        let mut unstructured = Unstructured::new(&buf);
18579        Self::arbitrary(&mut unstructured).unwrap_or_default()
18580    }
18581}
18582impl Default for MAG_CAL_REPORT_DATA {
18583    fn default() -> Self {
18584        Self::DEFAULT.clone()
18585    }
18586}
18587impl MessageData for MAG_CAL_REPORT_DATA {
18588    type Message = MavMessage;
18589    const ID: u32 = 192u32;
18590    const NAME: &'static str = "MAG_CAL_REPORT";
18591    const EXTRA_CRC: u8 = 36u8;
18592    const ENCODED_LEN: usize = 54usize;
18593    fn deser(
18594        _version: MavlinkVersion,
18595        __input: &[u8],
18596    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18597        let avail_len = __input.len();
18598        let mut payload_buf = [0; Self::ENCODED_LEN];
18599        let mut buf = if avail_len < Self::ENCODED_LEN {
18600            payload_buf[0..avail_len].copy_from_slice(__input);
18601            Bytes::new(&payload_buf)
18602        } else {
18603            Bytes::new(__input)
18604        };
18605        let mut __struct = Self::default();
18606        __struct.fitness = buf.get_f32_le()?;
18607        __struct.ofs_x = buf.get_f32_le()?;
18608        __struct.ofs_y = buf.get_f32_le()?;
18609        __struct.ofs_z = buf.get_f32_le()?;
18610        __struct.diag_x = buf.get_f32_le()?;
18611        __struct.diag_y = buf.get_f32_le()?;
18612        __struct.diag_z = buf.get_f32_le()?;
18613        __struct.offdiag_x = buf.get_f32_le()?;
18614        __struct.offdiag_y = buf.get_f32_le()?;
18615        __struct.offdiag_z = buf.get_f32_le()?;
18616        __struct.compass_id = buf.get_u8()?;
18617        __struct.cal_mask = buf.get_u8()?;
18618        let tmp = buf.get_u8()?;
18619        __struct.cal_status =
18620            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18621                enum_type: "MagCalStatus",
18622                value: tmp as u64,
18623            })?;
18624        __struct.autosaved = buf.get_u8()?;
18625        __struct.orientation_confidence = buf.get_f32_le()?;
18626        let tmp = buf.get_u8()?;
18627        __struct.old_orientation =
18628            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18629                enum_type: "MavSensorOrientation",
18630                value: tmp as u64,
18631            })?;
18632        let tmp = buf.get_u8()?;
18633        __struct.new_orientation =
18634            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18635                enum_type: "MavSensorOrientation",
18636                value: tmp as u64,
18637            })?;
18638        __struct.scale_factor = buf.get_f32_le()?;
18639        Ok(__struct)
18640    }
18641    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18642        let mut __tmp = BytesMut::new(bytes);
18643        #[allow(clippy::absurd_extreme_comparisons)]
18644        #[allow(unused_comparisons)]
18645        if __tmp.remaining() < Self::ENCODED_LEN {
18646            panic!(
18647                "buffer is too small (need {} bytes, but got {})",
18648                Self::ENCODED_LEN,
18649                __tmp.remaining(),
18650            )
18651        }
18652        __tmp.put_f32_le(self.fitness);
18653        __tmp.put_f32_le(self.ofs_x);
18654        __tmp.put_f32_le(self.ofs_y);
18655        __tmp.put_f32_le(self.ofs_z);
18656        __tmp.put_f32_le(self.diag_x);
18657        __tmp.put_f32_le(self.diag_y);
18658        __tmp.put_f32_le(self.diag_z);
18659        __tmp.put_f32_le(self.offdiag_x);
18660        __tmp.put_f32_le(self.offdiag_y);
18661        __tmp.put_f32_le(self.offdiag_z);
18662        __tmp.put_u8(self.compass_id);
18663        __tmp.put_u8(self.cal_mask);
18664        __tmp.put_u8(self.cal_status as u8);
18665        __tmp.put_u8(self.autosaved);
18666        if matches!(version, MavlinkVersion::V2) {
18667            __tmp.put_f32_le(self.orientation_confidence);
18668            __tmp.put_u8(self.old_orientation as u8);
18669            __tmp.put_u8(self.new_orientation as u8);
18670            __tmp.put_f32_le(self.scale_factor);
18671            let len = __tmp.len();
18672            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18673        } else {
18674            __tmp.len()
18675        }
18676    }
18677}
18678#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
18679#[doc = ""]
18680#[doc = "ID: 69"]
18681#[derive(Debug, Clone, PartialEq)]
18682#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18683#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18684#[cfg_attr(feature = "ts", derive(TS))]
18685#[cfg_attr(feature = "ts", ts(export))]
18686pub struct MANUAL_CONTROL_DATA {
18687    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
18688    pub x: i16,
18689    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
18690    pub y: i16,
18691    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
18692    pub z: i16,
18693    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
18694    pub r: i16,
18695    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
18696    pub buttons: u16,
18697    #[doc = "The system to be controlled."]
18698    pub target: u8,
18699    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
18700    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18701    pub buttons2: u16,
18702    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
18703    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18704    pub enabled_extensions: u8,
18705    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
18706    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18707    pub s: i16,
18708    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
18709    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18710    pub t: i16,
18711    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
18712    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18713    pub aux1: i16,
18714    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
18715    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18716    pub aux2: i16,
18717    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
18718    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18719    pub aux3: i16,
18720    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
18721    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18722    pub aux4: i16,
18723    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
18724    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18725    pub aux5: i16,
18726    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
18727    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18728    pub aux6: i16,
18729}
18730impl MANUAL_CONTROL_DATA {
18731    pub const ENCODED_LEN: usize = 30usize;
18732    pub const DEFAULT: Self = Self {
18733        x: 0_i16,
18734        y: 0_i16,
18735        z: 0_i16,
18736        r: 0_i16,
18737        buttons: 0_u16,
18738        target: 0_u8,
18739        buttons2: 0_u16,
18740        enabled_extensions: 0_u8,
18741        s: 0_i16,
18742        t: 0_i16,
18743        aux1: 0_i16,
18744        aux2: 0_i16,
18745        aux3: 0_i16,
18746        aux4: 0_i16,
18747        aux5: 0_i16,
18748        aux6: 0_i16,
18749    };
18750    #[cfg(feature = "arbitrary")]
18751    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18752        use arbitrary::{Arbitrary, Unstructured};
18753        let mut buf = [0u8; 1024];
18754        rng.fill_bytes(&mut buf);
18755        let mut unstructured = Unstructured::new(&buf);
18756        Self::arbitrary(&mut unstructured).unwrap_or_default()
18757    }
18758}
18759impl Default for MANUAL_CONTROL_DATA {
18760    fn default() -> Self {
18761        Self::DEFAULT.clone()
18762    }
18763}
18764impl MessageData for MANUAL_CONTROL_DATA {
18765    type Message = MavMessage;
18766    const ID: u32 = 69u32;
18767    const NAME: &'static str = "MANUAL_CONTROL";
18768    const EXTRA_CRC: u8 = 243u8;
18769    const ENCODED_LEN: usize = 30usize;
18770    fn deser(
18771        _version: MavlinkVersion,
18772        __input: &[u8],
18773    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18774        let avail_len = __input.len();
18775        let mut payload_buf = [0; Self::ENCODED_LEN];
18776        let mut buf = if avail_len < Self::ENCODED_LEN {
18777            payload_buf[0..avail_len].copy_from_slice(__input);
18778            Bytes::new(&payload_buf)
18779        } else {
18780            Bytes::new(__input)
18781        };
18782        let mut __struct = Self::default();
18783        __struct.x = buf.get_i16_le()?;
18784        __struct.y = buf.get_i16_le()?;
18785        __struct.z = buf.get_i16_le()?;
18786        __struct.r = buf.get_i16_le()?;
18787        __struct.buttons = buf.get_u16_le()?;
18788        __struct.target = buf.get_u8()?;
18789        __struct.buttons2 = buf.get_u16_le()?;
18790        __struct.enabled_extensions = buf.get_u8()?;
18791        __struct.s = buf.get_i16_le()?;
18792        __struct.t = buf.get_i16_le()?;
18793        __struct.aux1 = buf.get_i16_le()?;
18794        __struct.aux2 = buf.get_i16_le()?;
18795        __struct.aux3 = buf.get_i16_le()?;
18796        __struct.aux4 = buf.get_i16_le()?;
18797        __struct.aux5 = buf.get_i16_le()?;
18798        __struct.aux6 = buf.get_i16_le()?;
18799        Ok(__struct)
18800    }
18801    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18802        let mut __tmp = BytesMut::new(bytes);
18803        #[allow(clippy::absurd_extreme_comparisons)]
18804        #[allow(unused_comparisons)]
18805        if __tmp.remaining() < Self::ENCODED_LEN {
18806            panic!(
18807                "buffer is too small (need {} bytes, but got {})",
18808                Self::ENCODED_LEN,
18809                __tmp.remaining(),
18810            )
18811        }
18812        __tmp.put_i16_le(self.x);
18813        __tmp.put_i16_le(self.y);
18814        __tmp.put_i16_le(self.z);
18815        __tmp.put_i16_le(self.r);
18816        __tmp.put_u16_le(self.buttons);
18817        __tmp.put_u8(self.target);
18818        if matches!(version, MavlinkVersion::V2) {
18819            __tmp.put_u16_le(self.buttons2);
18820            __tmp.put_u8(self.enabled_extensions);
18821            __tmp.put_i16_le(self.s);
18822            __tmp.put_i16_le(self.t);
18823            __tmp.put_i16_le(self.aux1);
18824            __tmp.put_i16_le(self.aux2);
18825            __tmp.put_i16_le(self.aux3);
18826            __tmp.put_i16_le(self.aux4);
18827            __tmp.put_i16_le(self.aux5);
18828            __tmp.put_i16_le(self.aux6);
18829            let len = __tmp.len();
18830            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18831        } else {
18832            __tmp.len()
18833        }
18834    }
18835}
18836#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
18837#[doc = ""]
18838#[doc = "ID: 81"]
18839#[derive(Debug, Clone, PartialEq)]
18840#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18841#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18842#[cfg_attr(feature = "ts", derive(TS))]
18843#[cfg_attr(feature = "ts", ts(export))]
18844pub struct MANUAL_SETPOINT_DATA {
18845    #[doc = "Timestamp (time since system boot)."]
18846    pub time_boot_ms: u32,
18847    #[doc = "Desired roll rate"]
18848    pub roll: f32,
18849    #[doc = "Desired pitch rate"]
18850    pub pitch: f32,
18851    #[doc = "Desired yaw rate"]
18852    pub yaw: f32,
18853    #[doc = "Collective thrust, normalized to 0 .. 1"]
18854    pub thrust: f32,
18855    #[doc = "Flight mode switch position, 0.. 255"]
18856    pub mode_switch: u8,
18857    #[doc = "Override mode switch position, 0.. 255"]
18858    pub manual_override_switch: u8,
18859}
18860impl MANUAL_SETPOINT_DATA {
18861    pub const ENCODED_LEN: usize = 22usize;
18862    pub const DEFAULT: Self = Self {
18863        time_boot_ms: 0_u32,
18864        roll: 0.0_f32,
18865        pitch: 0.0_f32,
18866        yaw: 0.0_f32,
18867        thrust: 0.0_f32,
18868        mode_switch: 0_u8,
18869        manual_override_switch: 0_u8,
18870    };
18871    #[cfg(feature = "arbitrary")]
18872    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18873        use arbitrary::{Arbitrary, Unstructured};
18874        let mut buf = [0u8; 1024];
18875        rng.fill_bytes(&mut buf);
18876        let mut unstructured = Unstructured::new(&buf);
18877        Self::arbitrary(&mut unstructured).unwrap_or_default()
18878    }
18879}
18880impl Default for MANUAL_SETPOINT_DATA {
18881    fn default() -> Self {
18882        Self::DEFAULT.clone()
18883    }
18884}
18885impl MessageData for MANUAL_SETPOINT_DATA {
18886    type Message = MavMessage;
18887    const ID: u32 = 81u32;
18888    const NAME: &'static str = "MANUAL_SETPOINT";
18889    const EXTRA_CRC: u8 = 106u8;
18890    const ENCODED_LEN: usize = 22usize;
18891    fn deser(
18892        _version: MavlinkVersion,
18893        __input: &[u8],
18894    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18895        let avail_len = __input.len();
18896        let mut payload_buf = [0; Self::ENCODED_LEN];
18897        let mut buf = if avail_len < Self::ENCODED_LEN {
18898            payload_buf[0..avail_len].copy_from_slice(__input);
18899            Bytes::new(&payload_buf)
18900        } else {
18901            Bytes::new(__input)
18902        };
18903        let mut __struct = Self::default();
18904        __struct.time_boot_ms = buf.get_u32_le()?;
18905        __struct.roll = buf.get_f32_le()?;
18906        __struct.pitch = buf.get_f32_le()?;
18907        __struct.yaw = buf.get_f32_le()?;
18908        __struct.thrust = buf.get_f32_le()?;
18909        __struct.mode_switch = buf.get_u8()?;
18910        __struct.manual_override_switch = buf.get_u8()?;
18911        Ok(__struct)
18912    }
18913    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18914        let mut __tmp = BytesMut::new(bytes);
18915        #[allow(clippy::absurd_extreme_comparisons)]
18916        #[allow(unused_comparisons)]
18917        if __tmp.remaining() < Self::ENCODED_LEN {
18918            panic!(
18919                "buffer is too small (need {} bytes, but got {})",
18920                Self::ENCODED_LEN,
18921                __tmp.remaining(),
18922            )
18923        }
18924        __tmp.put_u32_le(self.time_boot_ms);
18925        __tmp.put_f32_le(self.roll);
18926        __tmp.put_f32_le(self.pitch);
18927        __tmp.put_f32_le(self.yaw);
18928        __tmp.put_f32_le(self.thrust);
18929        __tmp.put_u8(self.mode_switch);
18930        __tmp.put_u8(self.manual_override_switch);
18931        if matches!(version, MavlinkVersion::V2) {
18932            let len = __tmp.len();
18933            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18934        } else {
18935            __tmp.len()
18936        }
18937    }
18938}
18939#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
18940#[doc = ""]
18941#[doc = "ID: 249"]
18942#[derive(Debug, Clone, PartialEq)]
18943#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18944#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18945#[cfg_attr(feature = "ts", derive(TS))]
18946#[cfg_attr(feature = "ts", ts(export))]
18947pub struct MEMORY_VECT_DATA {
18948    #[doc = "Starting address of the debug variables"]
18949    pub address: u16,
18950    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
18951    pub ver: u8,
18952    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
18953    pub mavtype: u8,
18954    #[doc = "Memory contents at specified address"]
18955    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18956    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18957    pub value: [i8; 32],
18958}
18959impl MEMORY_VECT_DATA {
18960    pub const ENCODED_LEN: usize = 36usize;
18961    pub const DEFAULT: Self = Self {
18962        address: 0_u16,
18963        ver: 0_u8,
18964        mavtype: 0_u8,
18965        value: [0_i8; 32usize],
18966    };
18967    #[cfg(feature = "arbitrary")]
18968    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18969        use arbitrary::{Arbitrary, Unstructured};
18970        let mut buf = [0u8; 1024];
18971        rng.fill_bytes(&mut buf);
18972        let mut unstructured = Unstructured::new(&buf);
18973        Self::arbitrary(&mut unstructured).unwrap_or_default()
18974    }
18975}
18976impl Default for MEMORY_VECT_DATA {
18977    fn default() -> Self {
18978        Self::DEFAULT.clone()
18979    }
18980}
18981impl MessageData for MEMORY_VECT_DATA {
18982    type Message = MavMessage;
18983    const ID: u32 = 249u32;
18984    const NAME: &'static str = "MEMORY_VECT";
18985    const EXTRA_CRC: u8 = 204u8;
18986    const ENCODED_LEN: usize = 36usize;
18987    fn deser(
18988        _version: MavlinkVersion,
18989        __input: &[u8],
18990    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18991        let avail_len = __input.len();
18992        let mut payload_buf = [0; Self::ENCODED_LEN];
18993        let mut buf = if avail_len < Self::ENCODED_LEN {
18994            payload_buf[0..avail_len].copy_from_slice(__input);
18995            Bytes::new(&payload_buf)
18996        } else {
18997            Bytes::new(__input)
18998        };
18999        let mut __struct = Self::default();
19000        __struct.address = buf.get_u16_le()?;
19001        __struct.ver = buf.get_u8()?;
19002        __struct.mavtype = buf.get_u8()?;
19003        for v in &mut __struct.value {
19004            let val = buf.get_i8()?;
19005            *v = val;
19006        }
19007        Ok(__struct)
19008    }
19009    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19010        let mut __tmp = BytesMut::new(bytes);
19011        #[allow(clippy::absurd_extreme_comparisons)]
19012        #[allow(unused_comparisons)]
19013        if __tmp.remaining() < Self::ENCODED_LEN {
19014            panic!(
19015                "buffer is too small (need {} bytes, but got {})",
19016                Self::ENCODED_LEN,
19017                __tmp.remaining(),
19018            )
19019        }
19020        __tmp.put_u16_le(self.address);
19021        __tmp.put_u8(self.ver);
19022        __tmp.put_u8(self.mavtype);
19023        for val in &self.value {
19024            __tmp.put_i8(*val);
19025        }
19026        if matches!(version, MavlinkVersion::V2) {
19027            let len = __tmp.len();
19028            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19029        } else {
19030            __tmp.len()
19031        }
19032    }
19033}
19034#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19035#[doc = ""]
19036#[doc = "ID: 244"]
19037#[derive(Debug, Clone, PartialEq)]
19038#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19040#[cfg_attr(feature = "ts", derive(TS))]
19041#[cfg_attr(feature = "ts", ts(export))]
19042pub struct MESSAGE_INTERVAL_DATA {
19043    #[doc = "The interval between two messages. A value of -1 indicates this stream is disabled, 0 indicates it is not available,&gt;0 indicates the interval at which it is sent."]
19044    pub interval_us: i32,
19045    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19046    pub message_id: u16,
19047}
19048impl MESSAGE_INTERVAL_DATA {
19049    pub const ENCODED_LEN: usize = 6usize;
19050    pub const DEFAULT: Self = Self {
19051        interval_us: 0_i32,
19052        message_id: 0_u16,
19053    };
19054    #[cfg(feature = "arbitrary")]
19055    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19056        use arbitrary::{Arbitrary, Unstructured};
19057        let mut buf = [0u8; 1024];
19058        rng.fill_bytes(&mut buf);
19059        let mut unstructured = Unstructured::new(&buf);
19060        Self::arbitrary(&mut unstructured).unwrap_or_default()
19061    }
19062}
19063impl Default for MESSAGE_INTERVAL_DATA {
19064    fn default() -> Self {
19065        Self::DEFAULT.clone()
19066    }
19067}
19068impl MessageData for MESSAGE_INTERVAL_DATA {
19069    type Message = MavMessage;
19070    const ID: u32 = 244u32;
19071    const NAME: &'static str = "MESSAGE_INTERVAL";
19072    const EXTRA_CRC: u8 = 95u8;
19073    const ENCODED_LEN: usize = 6usize;
19074    fn deser(
19075        _version: MavlinkVersion,
19076        __input: &[u8],
19077    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19078        let avail_len = __input.len();
19079        let mut payload_buf = [0; Self::ENCODED_LEN];
19080        let mut buf = if avail_len < Self::ENCODED_LEN {
19081            payload_buf[0..avail_len].copy_from_slice(__input);
19082            Bytes::new(&payload_buf)
19083        } else {
19084            Bytes::new(__input)
19085        };
19086        let mut __struct = Self::default();
19087        __struct.interval_us = buf.get_i32_le()?;
19088        __struct.message_id = buf.get_u16_le()?;
19089        Ok(__struct)
19090    }
19091    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19092        let mut __tmp = BytesMut::new(bytes);
19093        #[allow(clippy::absurd_extreme_comparisons)]
19094        #[allow(unused_comparisons)]
19095        if __tmp.remaining() < Self::ENCODED_LEN {
19096            panic!(
19097                "buffer is too small (need {} bytes, but got {})",
19098                Self::ENCODED_LEN,
19099                __tmp.remaining(),
19100            )
19101        }
19102        __tmp.put_i32_le(self.interval_us);
19103        __tmp.put_u16_le(self.message_id);
19104        if matches!(version, MavlinkVersion::V2) {
19105            let len = __tmp.len();
19106            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19107        } else {
19108            __tmp.len()
19109        }
19110    }
19111}
19112#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
19113#[doc = ""]
19114#[doc = "ID: 47"]
19115#[derive(Debug, Clone, PartialEq)]
19116#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19117#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19118#[cfg_attr(feature = "ts", derive(TS))]
19119#[cfg_attr(feature = "ts", ts(export))]
19120pub struct MISSION_ACK_DATA {
19121    #[doc = "System ID"]
19122    pub target_system: u8,
19123    #[doc = "Component ID"]
19124    pub target_component: u8,
19125    #[doc = "Mission result."]
19126    pub mavtype: MavMissionResult,
19127    #[doc = "Mission type."]
19128    #[cfg_attr(feature = "serde", serde(default))]
19129    pub mission_type: MavMissionType,
19130    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
19131    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19132    pub opaque_id: u32,
19133}
19134impl MISSION_ACK_DATA {
19135    pub const ENCODED_LEN: usize = 8usize;
19136    pub const DEFAULT: Self = Self {
19137        target_system: 0_u8,
19138        target_component: 0_u8,
19139        mavtype: MavMissionResult::DEFAULT,
19140        mission_type: MavMissionType::DEFAULT,
19141        opaque_id: 0_u32,
19142    };
19143    #[cfg(feature = "arbitrary")]
19144    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19145        use arbitrary::{Arbitrary, Unstructured};
19146        let mut buf = [0u8; 1024];
19147        rng.fill_bytes(&mut buf);
19148        let mut unstructured = Unstructured::new(&buf);
19149        Self::arbitrary(&mut unstructured).unwrap_or_default()
19150    }
19151}
19152impl Default for MISSION_ACK_DATA {
19153    fn default() -> Self {
19154        Self::DEFAULT.clone()
19155    }
19156}
19157impl MessageData for MISSION_ACK_DATA {
19158    type Message = MavMessage;
19159    const ID: u32 = 47u32;
19160    const NAME: &'static str = "MISSION_ACK";
19161    const EXTRA_CRC: u8 = 153u8;
19162    const ENCODED_LEN: usize = 8usize;
19163    fn deser(
19164        _version: MavlinkVersion,
19165        __input: &[u8],
19166    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19167        let avail_len = __input.len();
19168        let mut payload_buf = [0; Self::ENCODED_LEN];
19169        let mut buf = if avail_len < Self::ENCODED_LEN {
19170            payload_buf[0..avail_len].copy_from_slice(__input);
19171            Bytes::new(&payload_buf)
19172        } else {
19173            Bytes::new(__input)
19174        };
19175        let mut __struct = Self::default();
19176        __struct.target_system = buf.get_u8()?;
19177        __struct.target_component = buf.get_u8()?;
19178        let tmp = buf.get_u8()?;
19179        __struct.mavtype =
19180            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19181                enum_type: "MavMissionResult",
19182                value: tmp as u64,
19183            })?;
19184        let tmp = buf.get_u8()?;
19185        __struct.mission_type =
19186            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19187                enum_type: "MavMissionType",
19188                value: tmp as u64,
19189            })?;
19190        __struct.opaque_id = buf.get_u32_le()?;
19191        Ok(__struct)
19192    }
19193    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19194        let mut __tmp = BytesMut::new(bytes);
19195        #[allow(clippy::absurd_extreme_comparisons)]
19196        #[allow(unused_comparisons)]
19197        if __tmp.remaining() < Self::ENCODED_LEN {
19198            panic!(
19199                "buffer is too small (need {} bytes, but got {})",
19200                Self::ENCODED_LEN,
19201                __tmp.remaining(),
19202            )
19203        }
19204        __tmp.put_u8(self.target_system);
19205        __tmp.put_u8(self.target_component);
19206        __tmp.put_u8(self.mavtype as u8);
19207        if matches!(version, MavlinkVersion::V2) {
19208            __tmp.put_u8(self.mission_type as u8);
19209            __tmp.put_u32_le(self.opaque_id);
19210            let len = __tmp.len();
19211            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19212        } else {
19213            __tmp.len()
19214        }
19215    }
19216}
19217#[doc = "Delete all mission items at once."]
19218#[doc = ""]
19219#[doc = "ID: 45"]
19220#[derive(Debug, Clone, PartialEq)]
19221#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19223#[cfg_attr(feature = "ts", derive(TS))]
19224#[cfg_attr(feature = "ts", ts(export))]
19225pub struct MISSION_CLEAR_ALL_DATA {
19226    #[doc = "System ID"]
19227    pub target_system: u8,
19228    #[doc = "Component ID"]
19229    pub target_component: u8,
19230    #[doc = "Mission type."]
19231    #[cfg_attr(feature = "serde", serde(default))]
19232    pub mission_type: MavMissionType,
19233}
19234impl MISSION_CLEAR_ALL_DATA {
19235    pub const ENCODED_LEN: usize = 3usize;
19236    pub const DEFAULT: Self = Self {
19237        target_system: 0_u8,
19238        target_component: 0_u8,
19239        mission_type: MavMissionType::DEFAULT,
19240    };
19241    #[cfg(feature = "arbitrary")]
19242    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19243        use arbitrary::{Arbitrary, Unstructured};
19244        let mut buf = [0u8; 1024];
19245        rng.fill_bytes(&mut buf);
19246        let mut unstructured = Unstructured::new(&buf);
19247        Self::arbitrary(&mut unstructured).unwrap_or_default()
19248    }
19249}
19250impl Default for MISSION_CLEAR_ALL_DATA {
19251    fn default() -> Self {
19252        Self::DEFAULT.clone()
19253    }
19254}
19255impl MessageData for MISSION_CLEAR_ALL_DATA {
19256    type Message = MavMessage;
19257    const ID: u32 = 45u32;
19258    const NAME: &'static str = "MISSION_CLEAR_ALL";
19259    const EXTRA_CRC: u8 = 232u8;
19260    const ENCODED_LEN: usize = 3usize;
19261    fn deser(
19262        _version: MavlinkVersion,
19263        __input: &[u8],
19264    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19265        let avail_len = __input.len();
19266        let mut payload_buf = [0; Self::ENCODED_LEN];
19267        let mut buf = if avail_len < Self::ENCODED_LEN {
19268            payload_buf[0..avail_len].copy_from_slice(__input);
19269            Bytes::new(&payload_buf)
19270        } else {
19271            Bytes::new(__input)
19272        };
19273        let mut __struct = Self::default();
19274        __struct.target_system = buf.get_u8()?;
19275        __struct.target_component = buf.get_u8()?;
19276        let tmp = buf.get_u8()?;
19277        __struct.mission_type =
19278            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19279                enum_type: "MavMissionType",
19280                value: tmp as u64,
19281            })?;
19282        Ok(__struct)
19283    }
19284    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19285        let mut __tmp = BytesMut::new(bytes);
19286        #[allow(clippy::absurd_extreme_comparisons)]
19287        #[allow(unused_comparisons)]
19288        if __tmp.remaining() < Self::ENCODED_LEN {
19289            panic!(
19290                "buffer is too small (need {} bytes, but got {})",
19291                Self::ENCODED_LEN,
19292                __tmp.remaining(),
19293            )
19294        }
19295        __tmp.put_u8(self.target_system);
19296        __tmp.put_u8(self.target_component);
19297        if matches!(version, MavlinkVersion::V2) {
19298            __tmp.put_u8(self.mission_type as u8);
19299            let len = __tmp.len();
19300            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19301        } else {
19302            __tmp.len()
19303        }
19304    }
19305}
19306#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
19307#[doc = ""]
19308#[doc = "ID: 44"]
19309#[derive(Debug, Clone, PartialEq)]
19310#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19311#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19312#[cfg_attr(feature = "ts", derive(TS))]
19313#[cfg_attr(feature = "ts", ts(export))]
19314pub struct MISSION_COUNT_DATA {
19315    #[doc = "Number of mission items in the sequence"]
19316    pub count: u16,
19317    #[doc = "System ID"]
19318    pub target_system: u8,
19319    #[doc = "Component ID"]
19320    pub target_component: u8,
19321    #[doc = "Mission type."]
19322    #[cfg_attr(feature = "serde", serde(default))]
19323    pub mission_type: MavMissionType,
19324    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
19325    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19326    pub opaque_id: u32,
19327}
19328impl MISSION_COUNT_DATA {
19329    pub const ENCODED_LEN: usize = 9usize;
19330    pub const DEFAULT: Self = Self {
19331        count: 0_u16,
19332        target_system: 0_u8,
19333        target_component: 0_u8,
19334        mission_type: MavMissionType::DEFAULT,
19335        opaque_id: 0_u32,
19336    };
19337    #[cfg(feature = "arbitrary")]
19338    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19339        use arbitrary::{Arbitrary, Unstructured};
19340        let mut buf = [0u8; 1024];
19341        rng.fill_bytes(&mut buf);
19342        let mut unstructured = Unstructured::new(&buf);
19343        Self::arbitrary(&mut unstructured).unwrap_or_default()
19344    }
19345}
19346impl Default for MISSION_COUNT_DATA {
19347    fn default() -> Self {
19348        Self::DEFAULT.clone()
19349    }
19350}
19351impl MessageData for MISSION_COUNT_DATA {
19352    type Message = MavMessage;
19353    const ID: u32 = 44u32;
19354    const NAME: &'static str = "MISSION_COUNT";
19355    const EXTRA_CRC: u8 = 221u8;
19356    const ENCODED_LEN: usize = 9usize;
19357    fn deser(
19358        _version: MavlinkVersion,
19359        __input: &[u8],
19360    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19361        let avail_len = __input.len();
19362        let mut payload_buf = [0; Self::ENCODED_LEN];
19363        let mut buf = if avail_len < Self::ENCODED_LEN {
19364            payload_buf[0..avail_len].copy_from_slice(__input);
19365            Bytes::new(&payload_buf)
19366        } else {
19367            Bytes::new(__input)
19368        };
19369        let mut __struct = Self::default();
19370        __struct.count = buf.get_u16_le()?;
19371        __struct.target_system = buf.get_u8()?;
19372        __struct.target_component = buf.get_u8()?;
19373        let tmp = buf.get_u8()?;
19374        __struct.mission_type =
19375            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19376                enum_type: "MavMissionType",
19377                value: tmp as u64,
19378            })?;
19379        __struct.opaque_id = buf.get_u32_le()?;
19380        Ok(__struct)
19381    }
19382    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19383        let mut __tmp = BytesMut::new(bytes);
19384        #[allow(clippy::absurd_extreme_comparisons)]
19385        #[allow(unused_comparisons)]
19386        if __tmp.remaining() < Self::ENCODED_LEN {
19387            panic!(
19388                "buffer is too small (need {} bytes, but got {})",
19389                Self::ENCODED_LEN,
19390                __tmp.remaining(),
19391            )
19392        }
19393        __tmp.put_u16_le(self.count);
19394        __tmp.put_u8(self.target_system);
19395        __tmp.put_u8(self.target_component);
19396        if matches!(version, MavlinkVersion::V2) {
19397            __tmp.put_u8(self.mission_type as u8);
19398            __tmp.put_u32_le(self.opaque_id);
19399            let len = __tmp.len();
19400            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19401        } else {
19402            __tmp.len()
19403        }
19404    }
19405}
19406#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
19407#[doc = ""]
19408#[doc = "ID: 42"]
19409#[derive(Debug, Clone, PartialEq)]
19410#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19411#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19412#[cfg_attr(feature = "ts", derive(TS))]
19413#[cfg_attr(feature = "ts", ts(export))]
19414pub struct MISSION_CURRENT_DATA {
19415    #[doc = "Sequence"]
19416    pub seq: u16,
19417    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
19418    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19419    pub total: u16,
19420    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
19421    #[cfg_attr(feature = "serde", serde(default))]
19422    pub mission_state: MissionState,
19423    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
19424    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19425    pub mission_mode: u8,
19426    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
19427    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19428    pub mission_id: u32,
19429    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
19430    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19431    pub fence_id: u32,
19432    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
19433    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19434    pub rally_points_id: u32,
19435}
19436impl MISSION_CURRENT_DATA {
19437    pub const ENCODED_LEN: usize = 18usize;
19438    pub const DEFAULT: Self = Self {
19439        seq: 0_u16,
19440        total: 0_u16,
19441        mission_state: MissionState::DEFAULT,
19442        mission_mode: 0_u8,
19443        mission_id: 0_u32,
19444        fence_id: 0_u32,
19445        rally_points_id: 0_u32,
19446    };
19447    #[cfg(feature = "arbitrary")]
19448    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19449        use arbitrary::{Arbitrary, Unstructured};
19450        let mut buf = [0u8; 1024];
19451        rng.fill_bytes(&mut buf);
19452        let mut unstructured = Unstructured::new(&buf);
19453        Self::arbitrary(&mut unstructured).unwrap_or_default()
19454    }
19455}
19456impl Default for MISSION_CURRENT_DATA {
19457    fn default() -> Self {
19458        Self::DEFAULT.clone()
19459    }
19460}
19461impl MessageData for MISSION_CURRENT_DATA {
19462    type Message = MavMessage;
19463    const ID: u32 = 42u32;
19464    const NAME: &'static str = "MISSION_CURRENT";
19465    const EXTRA_CRC: u8 = 28u8;
19466    const ENCODED_LEN: usize = 18usize;
19467    fn deser(
19468        _version: MavlinkVersion,
19469        __input: &[u8],
19470    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19471        let avail_len = __input.len();
19472        let mut payload_buf = [0; Self::ENCODED_LEN];
19473        let mut buf = if avail_len < Self::ENCODED_LEN {
19474            payload_buf[0..avail_len].copy_from_slice(__input);
19475            Bytes::new(&payload_buf)
19476        } else {
19477            Bytes::new(__input)
19478        };
19479        let mut __struct = Self::default();
19480        __struct.seq = buf.get_u16_le()?;
19481        __struct.total = buf.get_u16_le()?;
19482        let tmp = buf.get_u8()?;
19483        __struct.mission_state =
19484            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19485                enum_type: "MissionState",
19486                value: tmp as u64,
19487            })?;
19488        __struct.mission_mode = buf.get_u8()?;
19489        __struct.mission_id = buf.get_u32_le()?;
19490        __struct.fence_id = buf.get_u32_le()?;
19491        __struct.rally_points_id = buf.get_u32_le()?;
19492        Ok(__struct)
19493    }
19494    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19495        let mut __tmp = BytesMut::new(bytes);
19496        #[allow(clippy::absurd_extreme_comparisons)]
19497        #[allow(unused_comparisons)]
19498        if __tmp.remaining() < Self::ENCODED_LEN {
19499            panic!(
19500                "buffer is too small (need {} bytes, but got {})",
19501                Self::ENCODED_LEN,
19502                __tmp.remaining(),
19503            )
19504        }
19505        __tmp.put_u16_le(self.seq);
19506        if matches!(version, MavlinkVersion::V2) {
19507            __tmp.put_u16_le(self.total);
19508            __tmp.put_u8(self.mission_state as u8);
19509            __tmp.put_u8(self.mission_mode);
19510            __tmp.put_u32_le(self.mission_id);
19511            __tmp.put_u32_le(self.fence_id);
19512            __tmp.put_u32_le(self.rally_points_id);
19513            let len = __tmp.len();
19514            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19515        } else {
19516            __tmp.len()
19517        }
19518    }
19519}
19520#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
19521#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19522#[doc = ""]
19523#[doc = "ID: 39"]
19524#[derive(Debug, Clone, PartialEq)]
19525#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19526#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19527#[cfg_attr(feature = "ts", derive(TS))]
19528#[cfg_attr(feature = "ts", ts(export))]
19529pub struct MISSION_ITEM_DATA {
19530    #[doc = "PARAM1, see MAV_CMD enum"]
19531    pub param1: f32,
19532    #[doc = "PARAM2, see MAV_CMD enum"]
19533    pub param2: f32,
19534    #[doc = "PARAM3, see MAV_CMD enum"]
19535    pub param3: f32,
19536    #[doc = "PARAM4, see MAV_CMD enum"]
19537    pub param4: f32,
19538    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
19539    pub x: f32,
19540    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
19541    pub y: f32,
19542    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
19543    pub z: f32,
19544    #[doc = "Sequence"]
19545    pub seq: u16,
19546    #[doc = "The scheduled action for the waypoint."]
19547    pub command: MavCmd,
19548    #[doc = "System ID"]
19549    pub target_system: u8,
19550    #[doc = "Component ID"]
19551    pub target_component: u8,
19552    #[doc = "The coordinate system of the waypoint."]
19553    pub frame: MavFrame,
19554    #[doc = "false:0, true:1"]
19555    pub current: u8,
19556    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19557    pub autocontinue: u8,
19558    #[doc = "Mission type."]
19559    #[cfg_attr(feature = "serde", serde(default))]
19560    pub mission_type: MavMissionType,
19561}
19562impl MISSION_ITEM_DATA {
19563    pub const ENCODED_LEN: usize = 38usize;
19564    pub const DEFAULT: Self = Self {
19565        param1: 0.0_f32,
19566        param2: 0.0_f32,
19567        param3: 0.0_f32,
19568        param4: 0.0_f32,
19569        x: 0.0_f32,
19570        y: 0.0_f32,
19571        z: 0.0_f32,
19572        seq: 0_u16,
19573        command: MavCmd::DEFAULT,
19574        target_system: 0_u8,
19575        target_component: 0_u8,
19576        frame: MavFrame::DEFAULT,
19577        current: 0_u8,
19578        autocontinue: 0_u8,
19579        mission_type: MavMissionType::DEFAULT,
19580    };
19581    #[cfg(feature = "arbitrary")]
19582    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19583        use arbitrary::{Arbitrary, Unstructured};
19584        let mut buf = [0u8; 1024];
19585        rng.fill_bytes(&mut buf);
19586        let mut unstructured = Unstructured::new(&buf);
19587        Self::arbitrary(&mut unstructured).unwrap_or_default()
19588    }
19589}
19590impl Default for MISSION_ITEM_DATA {
19591    fn default() -> Self {
19592        Self::DEFAULT.clone()
19593    }
19594}
19595impl MessageData for MISSION_ITEM_DATA {
19596    type Message = MavMessage;
19597    const ID: u32 = 39u32;
19598    const NAME: &'static str = "MISSION_ITEM";
19599    const EXTRA_CRC: u8 = 254u8;
19600    const ENCODED_LEN: usize = 38usize;
19601    fn deser(
19602        _version: MavlinkVersion,
19603        __input: &[u8],
19604    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19605        let avail_len = __input.len();
19606        let mut payload_buf = [0; Self::ENCODED_LEN];
19607        let mut buf = if avail_len < Self::ENCODED_LEN {
19608            payload_buf[0..avail_len].copy_from_slice(__input);
19609            Bytes::new(&payload_buf)
19610        } else {
19611            Bytes::new(__input)
19612        };
19613        let mut __struct = Self::default();
19614        __struct.param1 = buf.get_f32_le()?;
19615        __struct.param2 = buf.get_f32_le()?;
19616        __struct.param3 = buf.get_f32_le()?;
19617        __struct.param4 = buf.get_f32_le()?;
19618        __struct.x = buf.get_f32_le()?;
19619        __struct.y = buf.get_f32_le()?;
19620        __struct.z = buf.get_f32_le()?;
19621        __struct.seq = buf.get_u16_le()?;
19622        let tmp = buf.get_u16_le()?;
19623        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19624            ::mavlink_core::error::ParserError::InvalidEnum {
19625                enum_type: "MavCmd",
19626                value: tmp as u64,
19627            },
19628        )?;
19629        __struct.target_system = buf.get_u8()?;
19630        __struct.target_component = buf.get_u8()?;
19631        let tmp = buf.get_u8()?;
19632        __struct.frame =
19633            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19634                enum_type: "MavFrame",
19635                value: tmp as u64,
19636            })?;
19637        __struct.current = buf.get_u8()?;
19638        __struct.autocontinue = buf.get_u8()?;
19639        let tmp = buf.get_u8()?;
19640        __struct.mission_type =
19641            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19642                enum_type: "MavMissionType",
19643                value: tmp as u64,
19644            })?;
19645        Ok(__struct)
19646    }
19647    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19648        let mut __tmp = BytesMut::new(bytes);
19649        #[allow(clippy::absurd_extreme_comparisons)]
19650        #[allow(unused_comparisons)]
19651        if __tmp.remaining() < Self::ENCODED_LEN {
19652            panic!(
19653                "buffer is too small (need {} bytes, but got {})",
19654                Self::ENCODED_LEN,
19655                __tmp.remaining(),
19656            )
19657        }
19658        __tmp.put_f32_le(self.param1);
19659        __tmp.put_f32_le(self.param2);
19660        __tmp.put_f32_le(self.param3);
19661        __tmp.put_f32_le(self.param4);
19662        __tmp.put_f32_le(self.x);
19663        __tmp.put_f32_le(self.y);
19664        __tmp.put_f32_le(self.z);
19665        __tmp.put_u16_le(self.seq);
19666        __tmp.put_u16_le(self.command as u16);
19667        __tmp.put_u8(self.target_system);
19668        __tmp.put_u8(self.target_component);
19669        __tmp.put_u8(self.frame as u8);
19670        __tmp.put_u8(self.current);
19671        __tmp.put_u8(self.autocontinue);
19672        if matches!(version, MavlinkVersion::V2) {
19673            __tmp.put_u8(self.mission_type as u8);
19674            let len = __tmp.len();
19675            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19676        } else {
19677            __tmp.len()
19678        }
19679    }
19680}
19681#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19682#[doc = ""]
19683#[doc = "ID: 73"]
19684#[derive(Debug, Clone, PartialEq)]
19685#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19686#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19687#[cfg_attr(feature = "ts", derive(TS))]
19688#[cfg_attr(feature = "ts", ts(export))]
19689pub struct MISSION_ITEM_INT_DATA {
19690    #[doc = "PARAM1, see MAV_CMD enum"]
19691    pub param1: f32,
19692    #[doc = "PARAM2, see MAV_CMD enum"]
19693    pub param2: f32,
19694    #[doc = "PARAM3, see MAV_CMD enum"]
19695    pub param3: f32,
19696    #[doc = "PARAM4, see MAV_CMD enum"]
19697    pub param4: f32,
19698    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
19699    pub x: i32,
19700    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
19701    pub y: i32,
19702    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
19703    pub z: f32,
19704    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
19705    pub seq: u16,
19706    #[doc = "The scheduled action for the waypoint."]
19707    pub command: MavCmd,
19708    #[doc = "System ID"]
19709    pub target_system: u8,
19710    #[doc = "Component ID"]
19711    pub target_component: u8,
19712    #[doc = "The coordinate system of the waypoint."]
19713    pub frame: MavFrame,
19714    #[doc = "false:0, true:1"]
19715    pub current: u8,
19716    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19717    pub autocontinue: u8,
19718    #[doc = "Mission type."]
19719    #[cfg_attr(feature = "serde", serde(default))]
19720    pub mission_type: MavMissionType,
19721}
19722impl MISSION_ITEM_INT_DATA {
19723    pub const ENCODED_LEN: usize = 38usize;
19724    pub const DEFAULT: Self = Self {
19725        param1: 0.0_f32,
19726        param2: 0.0_f32,
19727        param3: 0.0_f32,
19728        param4: 0.0_f32,
19729        x: 0_i32,
19730        y: 0_i32,
19731        z: 0.0_f32,
19732        seq: 0_u16,
19733        command: MavCmd::DEFAULT,
19734        target_system: 0_u8,
19735        target_component: 0_u8,
19736        frame: MavFrame::DEFAULT,
19737        current: 0_u8,
19738        autocontinue: 0_u8,
19739        mission_type: MavMissionType::DEFAULT,
19740    };
19741    #[cfg(feature = "arbitrary")]
19742    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19743        use arbitrary::{Arbitrary, Unstructured};
19744        let mut buf = [0u8; 1024];
19745        rng.fill_bytes(&mut buf);
19746        let mut unstructured = Unstructured::new(&buf);
19747        Self::arbitrary(&mut unstructured).unwrap_or_default()
19748    }
19749}
19750impl Default for MISSION_ITEM_INT_DATA {
19751    fn default() -> Self {
19752        Self::DEFAULT.clone()
19753    }
19754}
19755impl MessageData for MISSION_ITEM_INT_DATA {
19756    type Message = MavMessage;
19757    const ID: u32 = 73u32;
19758    const NAME: &'static str = "MISSION_ITEM_INT";
19759    const EXTRA_CRC: u8 = 38u8;
19760    const ENCODED_LEN: usize = 38usize;
19761    fn deser(
19762        _version: MavlinkVersion,
19763        __input: &[u8],
19764    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19765        let avail_len = __input.len();
19766        let mut payload_buf = [0; Self::ENCODED_LEN];
19767        let mut buf = if avail_len < Self::ENCODED_LEN {
19768            payload_buf[0..avail_len].copy_from_slice(__input);
19769            Bytes::new(&payload_buf)
19770        } else {
19771            Bytes::new(__input)
19772        };
19773        let mut __struct = Self::default();
19774        __struct.param1 = buf.get_f32_le()?;
19775        __struct.param2 = buf.get_f32_le()?;
19776        __struct.param3 = buf.get_f32_le()?;
19777        __struct.param4 = buf.get_f32_le()?;
19778        __struct.x = buf.get_i32_le()?;
19779        __struct.y = buf.get_i32_le()?;
19780        __struct.z = buf.get_f32_le()?;
19781        __struct.seq = buf.get_u16_le()?;
19782        let tmp = buf.get_u16_le()?;
19783        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19784            ::mavlink_core::error::ParserError::InvalidEnum {
19785                enum_type: "MavCmd",
19786                value: tmp as u64,
19787            },
19788        )?;
19789        __struct.target_system = buf.get_u8()?;
19790        __struct.target_component = buf.get_u8()?;
19791        let tmp = buf.get_u8()?;
19792        __struct.frame =
19793            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19794                enum_type: "MavFrame",
19795                value: tmp as u64,
19796            })?;
19797        __struct.current = buf.get_u8()?;
19798        __struct.autocontinue = buf.get_u8()?;
19799        let tmp = buf.get_u8()?;
19800        __struct.mission_type =
19801            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19802                enum_type: "MavMissionType",
19803                value: tmp as u64,
19804            })?;
19805        Ok(__struct)
19806    }
19807    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19808        let mut __tmp = BytesMut::new(bytes);
19809        #[allow(clippy::absurd_extreme_comparisons)]
19810        #[allow(unused_comparisons)]
19811        if __tmp.remaining() < Self::ENCODED_LEN {
19812            panic!(
19813                "buffer is too small (need {} bytes, but got {})",
19814                Self::ENCODED_LEN,
19815                __tmp.remaining(),
19816            )
19817        }
19818        __tmp.put_f32_le(self.param1);
19819        __tmp.put_f32_le(self.param2);
19820        __tmp.put_f32_le(self.param3);
19821        __tmp.put_f32_le(self.param4);
19822        __tmp.put_i32_le(self.x);
19823        __tmp.put_i32_le(self.y);
19824        __tmp.put_f32_le(self.z);
19825        __tmp.put_u16_le(self.seq);
19826        __tmp.put_u16_le(self.command as u16);
19827        __tmp.put_u8(self.target_system);
19828        __tmp.put_u8(self.target_component);
19829        __tmp.put_u8(self.frame as u8);
19830        __tmp.put_u8(self.current);
19831        __tmp.put_u8(self.autocontinue);
19832        if matches!(version, MavlinkVersion::V2) {
19833            __tmp.put_u8(self.mission_type as u8);
19834            let len = __tmp.len();
19835            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19836        } else {
19837            __tmp.len()
19838        }
19839    }
19840}
19841#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
19842#[doc = ""]
19843#[doc = "ID: 46"]
19844#[derive(Debug, Clone, PartialEq)]
19845#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19847#[cfg_attr(feature = "ts", derive(TS))]
19848#[cfg_attr(feature = "ts", ts(export))]
19849pub struct MISSION_ITEM_REACHED_DATA {
19850    #[doc = "Sequence"]
19851    pub seq: u16,
19852}
19853impl MISSION_ITEM_REACHED_DATA {
19854    pub const ENCODED_LEN: usize = 2usize;
19855    pub const DEFAULT: Self = Self { seq: 0_u16 };
19856    #[cfg(feature = "arbitrary")]
19857    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19858        use arbitrary::{Arbitrary, Unstructured};
19859        let mut buf = [0u8; 1024];
19860        rng.fill_bytes(&mut buf);
19861        let mut unstructured = Unstructured::new(&buf);
19862        Self::arbitrary(&mut unstructured).unwrap_or_default()
19863    }
19864}
19865impl Default for MISSION_ITEM_REACHED_DATA {
19866    fn default() -> Self {
19867        Self::DEFAULT.clone()
19868    }
19869}
19870impl MessageData for MISSION_ITEM_REACHED_DATA {
19871    type Message = MavMessage;
19872    const ID: u32 = 46u32;
19873    const NAME: &'static str = "MISSION_ITEM_REACHED";
19874    const EXTRA_CRC: u8 = 11u8;
19875    const ENCODED_LEN: usize = 2usize;
19876    fn deser(
19877        _version: MavlinkVersion,
19878        __input: &[u8],
19879    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19880        let avail_len = __input.len();
19881        let mut payload_buf = [0; Self::ENCODED_LEN];
19882        let mut buf = if avail_len < Self::ENCODED_LEN {
19883            payload_buf[0..avail_len].copy_from_slice(__input);
19884            Bytes::new(&payload_buf)
19885        } else {
19886            Bytes::new(__input)
19887        };
19888        let mut __struct = Self::default();
19889        __struct.seq = buf.get_u16_le()?;
19890        Ok(__struct)
19891    }
19892    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19893        let mut __tmp = BytesMut::new(bytes);
19894        #[allow(clippy::absurd_extreme_comparisons)]
19895        #[allow(unused_comparisons)]
19896        if __tmp.remaining() < Self::ENCODED_LEN {
19897            panic!(
19898                "buffer is too small (need {} bytes, but got {})",
19899                Self::ENCODED_LEN,
19900                __tmp.remaining(),
19901            )
19902        }
19903        __tmp.put_u16_le(self.seq);
19904        if matches!(version, MavlinkVersion::V2) {
19905            let len = __tmp.len();
19906            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19907        } else {
19908            __tmp.len()
19909        }
19910    }
19911}
19912#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
19913#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
19914#[doc = ""]
19915#[doc = "ID: 40"]
19916#[derive(Debug, Clone, PartialEq)]
19917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19918#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19919#[cfg_attr(feature = "ts", derive(TS))]
19920#[cfg_attr(feature = "ts", ts(export))]
19921pub struct MISSION_REQUEST_DATA {
19922    #[doc = "Sequence"]
19923    pub seq: u16,
19924    #[doc = "System ID"]
19925    pub target_system: u8,
19926    #[doc = "Component ID"]
19927    pub target_component: u8,
19928    #[doc = "Mission type."]
19929    #[cfg_attr(feature = "serde", serde(default))]
19930    pub mission_type: MavMissionType,
19931}
19932impl MISSION_REQUEST_DATA {
19933    pub const ENCODED_LEN: usize = 5usize;
19934    pub const DEFAULT: Self = Self {
19935        seq: 0_u16,
19936        target_system: 0_u8,
19937        target_component: 0_u8,
19938        mission_type: MavMissionType::DEFAULT,
19939    };
19940    #[cfg(feature = "arbitrary")]
19941    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19942        use arbitrary::{Arbitrary, Unstructured};
19943        let mut buf = [0u8; 1024];
19944        rng.fill_bytes(&mut buf);
19945        let mut unstructured = Unstructured::new(&buf);
19946        Self::arbitrary(&mut unstructured).unwrap_or_default()
19947    }
19948}
19949impl Default for MISSION_REQUEST_DATA {
19950    fn default() -> Self {
19951        Self::DEFAULT.clone()
19952    }
19953}
19954impl MessageData for MISSION_REQUEST_DATA {
19955    type Message = MavMessage;
19956    const ID: u32 = 40u32;
19957    const NAME: &'static str = "MISSION_REQUEST";
19958    const EXTRA_CRC: u8 = 230u8;
19959    const ENCODED_LEN: usize = 5usize;
19960    fn deser(
19961        _version: MavlinkVersion,
19962        __input: &[u8],
19963    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19964        let avail_len = __input.len();
19965        let mut payload_buf = [0; Self::ENCODED_LEN];
19966        let mut buf = if avail_len < Self::ENCODED_LEN {
19967            payload_buf[0..avail_len].copy_from_slice(__input);
19968            Bytes::new(&payload_buf)
19969        } else {
19970            Bytes::new(__input)
19971        };
19972        let mut __struct = Self::default();
19973        __struct.seq = buf.get_u16_le()?;
19974        __struct.target_system = buf.get_u8()?;
19975        __struct.target_component = buf.get_u8()?;
19976        let tmp = buf.get_u8()?;
19977        __struct.mission_type =
19978            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19979                enum_type: "MavMissionType",
19980                value: tmp as u64,
19981            })?;
19982        Ok(__struct)
19983    }
19984    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19985        let mut __tmp = BytesMut::new(bytes);
19986        #[allow(clippy::absurd_extreme_comparisons)]
19987        #[allow(unused_comparisons)]
19988        if __tmp.remaining() < Self::ENCODED_LEN {
19989            panic!(
19990                "buffer is too small (need {} bytes, but got {})",
19991                Self::ENCODED_LEN,
19992                __tmp.remaining(),
19993            )
19994        }
19995        __tmp.put_u16_le(self.seq);
19996        __tmp.put_u8(self.target_system);
19997        __tmp.put_u8(self.target_component);
19998        if matches!(version, MavlinkVersion::V2) {
19999            __tmp.put_u8(self.mission_type as u8);
20000            let len = __tmp.len();
20001            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20002        } else {
20003            __tmp.len()
20004        }
20005    }
20006}
20007#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20008#[doc = ""]
20009#[doc = "ID: 51"]
20010#[derive(Debug, Clone, PartialEq)]
20011#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20012#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20013#[cfg_attr(feature = "ts", derive(TS))]
20014#[cfg_attr(feature = "ts", ts(export))]
20015pub struct MISSION_REQUEST_INT_DATA {
20016    #[doc = "Sequence"]
20017    pub seq: u16,
20018    #[doc = "System ID"]
20019    pub target_system: u8,
20020    #[doc = "Component ID"]
20021    pub target_component: u8,
20022    #[doc = "Mission type."]
20023    #[cfg_attr(feature = "serde", serde(default))]
20024    pub mission_type: MavMissionType,
20025}
20026impl MISSION_REQUEST_INT_DATA {
20027    pub const ENCODED_LEN: usize = 5usize;
20028    pub const DEFAULT: Self = Self {
20029        seq: 0_u16,
20030        target_system: 0_u8,
20031        target_component: 0_u8,
20032        mission_type: MavMissionType::DEFAULT,
20033    };
20034    #[cfg(feature = "arbitrary")]
20035    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20036        use arbitrary::{Arbitrary, Unstructured};
20037        let mut buf = [0u8; 1024];
20038        rng.fill_bytes(&mut buf);
20039        let mut unstructured = Unstructured::new(&buf);
20040        Self::arbitrary(&mut unstructured).unwrap_or_default()
20041    }
20042}
20043impl Default for MISSION_REQUEST_INT_DATA {
20044    fn default() -> Self {
20045        Self::DEFAULT.clone()
20046    }
20047}
20048impl MessageData for MISSION_REQUEST_INT_DATA {
20049    type Message = MavMessage;
20050    const ID: u32 = 51u32;
20051    const NAME: &'static str = "MISSION_REQUEST_INT";
20052    const EXTRA_CRC: u8 = 196u8;
20053    const ENCODED_LEN: usize = 5usize;
20054    fn deser(
20055        _version: MavlinkVersion,
20056        __input: &[u8],
20057    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20058        let avail_len = __input.len();
20059        let mut payload_buf = [0; Self::ENCODED_LEN];
20060        let mut buf = if avail_len < Self::ENCODED_LEN {
20061            payload_buf[0..avail_len].copy_from_slice(__input);
20062            Bytes::new(&payload_buf)
20063        } else {
20064            Bytes::new(__input)
20065        };
20066        let mut __struct = Self::default();
20067        __struct.seq = buf.get_u16_le()?;
20068        __struct.target_system = buf.get_u8()?;
20069        __struct.target_component = buf.get_u8()?;
20070        let tmp = buf.get_u8()?;
20071        __struct.mission_type =
20072            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20073                enum_type: "MavMissionType",
20074                value: tmp as u64,
20075            })?;
20076        Ok(__struct)
20077    }
20078    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20079        let mut __tmp = BytesMut::new(bytes);
20080        #[allow(clippy::absurd_extreme_comparisons)]
20081        #[allow(unused_comparisons)]
20082        if __tmp.remaining() < Self::ENCODED_LEN {
20083            panic!(
20084                "buffer is too small (need {} bytes, but got {})",
20085                Self::ENCODED_LEN,
20086                __tmp.remaining(),
20087            )
20088        }
20089        __tmp.put_u16_le(self.seq);
20090        __tmp.put_u8(self.target_system);
20091        __tmp.put_u8(self.target_component);
20092        if matches!(version, MavlinkVersion::V2) {
20093            __tmp.put_u8(self.mission_type as u8);
20094            let len = __tmp.len();
20095            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20096        } else {
20097            __tmp.len()
20098        }
20099    }
20100}
20101#[doc = "Request the overall list of mission items from the system/component."]
20102#[doc = ""]
20103#[doc = "ID: 43"]
20104#[derive(Debug, Clone, PartialEq)]
20105#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20106#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20107#[cfg_attr(feature = "ts", derive(TS))]
20108#[cfg_attr(feature = "ts", ts(export))]
20109pub struct MISSION_REQUEST_LIST_DATA {
20110    #[doc = "System ID"]
20111    pub target_system: u8,
20112    #[doc = "Component ID"]
20113    pub target_component: u8,
20114    #[doc = "Mission type."]
20115    #[cfg_attr(feature = "serde", serde(default))]
20116    pub mission_type: MavMissionType,
20117}
20118impl MISSION_REQUEST_LIST_DATA {
20119    pub const ENCODED_LEN: usize = 3usize;
20120    pub const DEFAULT: Self = Self {
20121        target_system: 0_u8,
20122        target_component: 0_u8,
20123        mission_type: MavMissionType::DEFAULT,
20124    };
20125    #[cfg(feature = "arbitrary")]
20126    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20127        use arbitrary::{Arbitrary, Unstructured};
20128        let mut buf = [0u8; 1024];
20129        rng.fill_bytes(&mut buf);
20130        let mut unstructured = Unstructured::new(&buf);
20131        Self::arbitrary(&mut unstructured).unwrap_or_default()
20132    }
20133}
20134impl Default for MISSION_REQUEST_LIST_DATA {
20135    fn default() -> Self {
20136        Self::DEFAULT.clone()
20137    }
20138}
20139impl MessageData for MISSION_REQUEST_LIST_DATA {
20140    type Message = MavMessage;
20141    const ID: u32 = 43u32;
20142    const NAME: &'static str = "MISSION_REQUEST_LIST";
20143    const EXTRA_CRC: u8 = 132u8;
20144    const ENCODED_LEN: usize = 3usize;
20145    fn deser(
20146        _version: MavlinkVersion,
20147        __input: &[u8],
20148    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20149        let avail_len = __input.len();
20150        let mut payload_buf = [0; Self::ENCODED_LEN];
20151        let mut buf = if avail_len < Self::ENCODED_LEN {
20152            payload_buf[0..avail_len].copy_from_slice(__input);
20153            Bytes::new(&payload_buf)
20154        } else {
20155            Bytes::new(__input)
20156        };
20157        let mut __struct = Self::default();
20158        __struct.target_system = buf.get_u8()?;
20159        __struct.target_component = buf.get_u8()?;
20160        let tmp = buf.get_u8()?;
20161        __struct.mission_type =
20162            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20163                enum_type: "MavMissionType",
20164                value: tmp as u64,
20165            })?;
20166        Ok(__struct)
20167    }
20168    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20169        let mut __tmp = BytesMut::new(bytes);
20170        #[allow(clippy::absurd_extreme_comparisons)]
20171        #[allow(unused_comparisons)]
20172        if __tmp.remaining() < Self::ENCODED_LEN {
20173            panic!(
20174                "buffer is too small (need {} bytes, but got {})",
20175                Self::ENCODED_LEN,
20176                __tmp.remaining(),
20177            )
20178        }
20179        __tmp.put_u8(self.target_system);
20180        __tmp.put_u8(self.target_component);
20181        if matches!(version, MavlinkVersion::V2) {
20182            __tmp.put_u8(self.mission_type as u8);
20183            let len = __tmp.len();
20184            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20185        } else {
20186            __tmp.len()
20187        }
20188    }
20189}
20190#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
20191#[doc = ""]
20192#[doc = "ID: 37"]
20193#[derive(Debug, Clone, PartialEq)]
20194#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20195#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20196#[cfg_attr(feature = "ts", derive(TS))]
20197#[cfg_attr(feature = "ts", ts(export))]
20198pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
20199    #[doc = "Start index"]
20200    pub start_index: i16,
20201    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
20202    pub end_index: i16,
20203    #[doc = "System ID"]
20204    pub target_system: u8,
20205    #[doc = "Component ID"]
20206    pub target_component: u8,
20207    #[doc = "Mission type."]
20208    #[cfg_attr(feature = "serde", serde(default))]
20209    pub mission_type: MavMissionType,
20210}
20211impl MISSION_REQUEST_PARTIAL_LIST_DATA {
20212    pub const ENCODED_LEN: usize = 7usize;
20213    pub const DEFAULT: Self = Self {
20214        start_index: 0_i16,
20215        end_index: 0_i16,
20216        target_system: 0_u8,
20217        target_component: 0_u8,
20218        mission_type: MavMissionType::DEFAULT,
20219    };
20220    #[cfg(feature = "arbitrary")]
20221    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20222        use arbitrary::{Arbitrary, Unstructured};
20223        let mut buf = [0u8; 1024];
20224        rng.fill_bytes(&mut buf);
20225        let mut unstructured = Unstructured::new(&buf);
20226        Self::arbitrary(&mut unstructured).unwrap_or_default()
20227    }
20228}
20229impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
20230    fn default() -> Self {
20231        Self::DEFAULT.clone()
20232    }
20233}
20234impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
20235    type Message = MavMessage;
20236    const ID: u32 = 37u32;
20237    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
20238    const EXTRA_CRC: u8 = 212u8;
20239    const ENCODED_LEN: usize = 7usize;
20240    fn deser(
20241        _version: MavlinkVersion,
20242        __input: &[u8],
20243    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20244        let avail_len = __input.len();
20245        let mut payload_buf = [0; Self::ENCODED_LEN];
20246        let mut buf = if avail_len < Self::ENCODED_LEN {
20247            payload_buf[0..avail_len].copy_from_slice(__input);
20248            Bytes::new(&payload_buf)
20249        } else {
20250            Bytes::new(__input)
20251        };
20252        let mut __struct = Self::default();
20253        __struct.start_index = buf.get_i16_le()?;
20254        __struct.end_index = buf.get_i16_le()?;
20255        __struct.target_system = buf.get_u8()?;
20256        __struct.target_component = buf.get_u8()?;
20257        let tmp = buf.get_u8()?;
20258        __struct.mission_type =
20259            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20260                enum_type: "MavMissionType",
20261                value: tmp as u64,
20262            })?;
20263        Ok(__struct)
20264    }
20265    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20266        let mut __tmp = BytesMut::new(bytes);
20267        #[allow(clippy::absurd_extreme_comparisons)]
20268        #[allow(unused_comparisons)]
20269        if __tmp.remaining() < Self::ENCODED_LEN {
20270            panic!(
20271                "buffer is too small (need {} bytes, but got {})",
20272                Self::ENCODED_LEN,
20273                __tmp.remaining(),
20274            )
20275        }
20276        __tmp.put_i16_le(self.start_index);
20277        __tmp.put_i16_le(self.end_index);
20278        __tmp.put_u8(self.target_system);
20279        __tmp.put_u8(self.target_component);
20280        if matches!(version, MavlinkVersion::V2) {
20281            __tmp.put_u8(self.mission_type as u8);
20282            let len = __tmp.len();
20283            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20284        } else {
20285            __tmp.len()
20286        }
20287    }
20288}
20289#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
20290#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
20291#[doc = ""]
20292#[doc = "ID: 41"]
20293#[derive(Debug, Clone, PartialEq)]
20294#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20295#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20296#[cfg_attr(feature = "ts", derive(TS))]
20297#[cfg_attr(feature = "ts", ts(export))]
20298pub struct MISSION_SET_CURRENT_DATA {
20299    #[doc = "Sequence"]
20300    pub seq: u16,
20301    #[doc = "System ID"]
20302    pub target_system: u8,
20303    #[doc = "Component ID"]
20304    pub target_component: u8,
20305}
20306impl MISSION_SET_CURRENT_DATA {
20307    pub const ENCODED_LEN: usize = 4usize;
20308    pub const DEFAULT: Self = Self {
20309        seq: 0_u16,
20310        target_system: 0_u8,
20311        target_component: 0_u8,
20312    };
20313    #[cfg(feature = "arbitrary")]
20314    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20315        use arbitrary::{Arbitrary, Unstructured};
20316        let mut buf = [0u8; 1024];
20317        rng.fill_bytes(&mut buf);
20318        let mut unstructured = Unstructured::new(&buf);
20319        Self::arbitrary(&mut unstructured).unwrap_or_default()
20320    }
20321}
20322impl Default for MISSION_SET_CURRENT_DATA {
20323    fn default() -> Self {
20324        Self::DEFAULT.clone()
20325    }
20326}
20327impl MessageData for MISSION_SET_CURRENT_DATA {
20328    type Message = MavMessage;
20329    const ID: u32 = 41u32;
20330    const NAME: &'static str = "MISSION_SET_CURRENT";
20331    const EXTRA_CRC: u8 = 28u8;
20332    const ENCODED_LEN: usize = 4usize;
20333    fn deser(
20334        _version: MavlinkVersion,
20335        __input: &[u8],
20336    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20337        let avail_len = __input.len();
20338        let mut payload_buf = [0; Self::ENCODED_LEN];
20339        let mut buf = if avail_len < Self::ENCODED_LEN {
20340            payload_buf[0..avail_len].copy_from_slice(__input);
20341            Bytes::new(&payload_buf)
20342        } else {
20343            Bytes::new(__input)
20344        };
20345        let mut __struct = Self::default();
20346        __struct.seq = buf.get_u16_le()?;
20347        __struct.target_system = buf.get_u8()?;
20348        __struct.target_component = buf.get_u8()?;
20349        Ok(__struct)
20350    }
20351    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20352        let mut __tmp = BytesMut::new(bytes);
20353        #[allow(clippy::absurd_extreme_comparisons)]
20354        #[allow(unused_comparisons)]
20355        if __tmp.remaining() < Self::ENCODED_LEN {
20356            panic!(
20357                "buffer is too small (need {} bytes, but got {})",
20358                Self::ENCODED_LEN,
20359                __tmp.remaining(),
20360            )
20361        }
20362        __tmp.put_u16_le(self.seq);
20363        __tmp.put_u8(self.target_system);
20364        __tmp.put_u8(self.target_component);
20365        if matches!(version, MavlinkVersion::V2) {
20366            let len = __tmp.len();
20367            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20368        } else {
20369            __tmp.len()
20370        }
20371    }
20372}
20373#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
20374#[doc = ""]
20375#[doc = "ID: 38"]
20376#[derive(Debug, Clone, PartialEq)]
20377#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20378#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20379#[cfg_attr(feature = "ts", derive(TS))]
20380#[cfg_attr(feature = "ts", ts(export))]
20381pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
20382    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
20383    pub start_index: i16,
20384    #[doc = "End index, equal or greater than start index."]
20385    pub end_index: i16,
20386    #[doc = "System ID"]
20387    pub target_system: u8,
20388    #[doc = "Component ID"]
20389    pub target_component: u8,
20390    #[doc = "Mission type."]
20391    #[cfg_attr(feature = "serde", serde(default))]
20392    pub mission_type: MavMissionType,
20393}
20394impl MISSION_WRITE_PARTIAL_LIST_DATA {
20395    pub const ENCODED_LEN: usize = 7usize;
20396    pub const DEFAULT: Self = Self {
20397        start_index: 0_i16,
20398        end_index: 0_i16,
20399        target_system: 0_u8,
20400        target_component: 0_u8,
20401        mission_type: MavMissionType::DEFAULT,
20402    };
20403    #[cfg(feature = "arbitrary")]
20404    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20405        use arbitrary::{Arbitrary, Unstructured};
20406        let mut buf = [0u8; 1024];
20407        rng.fill_bytes(&mut buf);
20408        let mut unstructured = Unstructured::new(&buf);
20409        Self::arbitrary(&mut unstructured).unwrap_or_default()
20410    }
20411}
20412impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
20413    fn default() -> Self {
20414        Self::DEFAULT.clone()
20415    }
20416}
20417impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
20418    type Message = MavMessage;
20419    const ID: u32 = 38u32;
20420    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
20421    const EXTRA_CRC: u8 = 9u8;
20422    const ENCODED_LEN: usize = 7usize;
20423    fn deser(
20424        _version: MavlinkVersion,
20425        __input: &[u8],
20426    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20427        let avail_len = __input.len();
20428        let mut payload_buf = [0; Self::ENCODED_LEN];
20429        let mut buf = if avail_len < Self::ENCODED_LEN {
20430            payload_buf[0..avail_len].copy_from_slice(__input);
20431            Bytes::new(&payload_buf)
20432        } else {
20433            Bytes::new(__input)
20434        };
20435        let mut __struct = Self::default();
20436        __struct.start_index = buf.get_i16_le()?;
20437        __struct.end_index = buf.get_i16_le()?;
20438        __struct.target_system = buf.get_u8()?;
20439        __struct.target_component = buf.get_u8()?;
20440        let tmp = buf.get_u8()?;
20441        __struct.mission_type =
20442            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20443                enum_type: "MavMissionType",
20444                value: tmp as u64,
20445            })?;
20446        Ok(__struct)
20447    }
20448    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20449        let mut __tmp = BytesMut::new(bytes);
20450        #[allow(clippy::absurd_extreme_comparisons)]
20451        #[allow(unused_comparisons)]
20452        if __tmp.remaining() < Self::ENCODED_LEN {
20453            panic!(
20454                "buffer is too small (need {} bytes, but got {})",
20455                Self::ENCODED_LEN,
20456                __tmp.remaining(),
20457            )
20458        }
20459        __tmp.put_i16_le(self.start_index);
20460        __tmp.put_i16_le(self.end_index);
20461        __tmp.put_u8(self.target_system);
20462        __tmp.put_u8(self.target_component);
20463        if matches!(version, MavlinkVersion::V2) {
20464            __tmp.put_u8(self.mission_type as u8);
20465            let len = __tmp.len();
20466            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20467        } else {
20468            __tmp.len()
20469        }
20470    }
20471}
20472#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
20473#[doc = "Orientation of a mount."]
20474#[doc = ""]
20475#[doc = "ID: 265"]
20476#[derive(Debug, Clone, PartialEq)]
20477#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20478#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20479#[cfg_attr(feature = "ts", derive(TS))]
20480#[cfg_attr(feature = "ts", ts(export))]
20481pub struct MOUNT_ORIENTATION_DATA {
20482    #[doc = "Timestamp (time since system boot)."]
20483    pub time_boot_ms: u32,
20484    #[doc = "Roll in global frame (set to NaN for invalid)."]
20485    pub roll: f32,
20486    #[doc = "Pitch in global frame (set to NaN for invalid)."]
20487    pub pitch: f32,
20488    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
20489    pub yaw: f32,
20490    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
20491    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20492    pub yaw_absolute: f32,
20493}
20494impl MOUNT_ORIENTATION_DATA {
20495    pub const ENCODED_LEN: usize = 20usize;
20496    pub const DEFAULT: Self = Self {
20497        time_boot_ms: 0_u32,
20498        roll: 0.0_f32,
20499        pitch: 0.0_f32,
20500        yaw: 0.0_f32,
20501        yaw_absolute: 0.0_f32,
20502    };
20503    #[cfg(feature = "arbitrary")]
20504    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20505        use arbitrary::{Arbitrary, Unstructured};
20506        let mut buf = [0u8; 1024];
20507        rng.fill_bytes(&mut buf);
20508        let mut unstructured = Unstructured::new(&buf);
20509        Self::arbitrary(&mut unstructured).unwrap_or_default()
20510    }
20511}
20512impl Default for MOUNT_ORIENTATION_DATA {
20513    fn default() -> Self {
20514        Self::DEFAULT.clone()
20515    }
20516}
20517impl MessageData for MOUNT_ORIENTATION_DATA {
20518    type Message = MavMessage;
20519    const ID: u32 = 265u32;
20520    const NAME: &'static str = "MOUNT_ORIENTATION";
20521    const EXTRA_CRC: u8 = 26u8;
20522    const ENCODED_LEN: usize = 20usize;
20523    fn deser(
20524        _version: MavlinkVersion,
20525        __input: &[u8],
20526    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20527        let avail_len = __input.len();
20528        let mut payload_buf = [0; Self::ENCODED_LEN];
20529        let mut buf = if avail_len < Self::ENCODED_LEN {
20530            payload_buf[0..avail_len].copy_from_slice(__input);
20531            Bytes::new(&payload_buf)
20532        } else {
20533            Bytes::new(__input)
20534        };
20535        let mut __struct = Self::default();
20536        __struct.time_boot_ms = buf.get_u32_le()?;
20537        __struct.roll = buf.get_f32_le()?;
20538        __struct.pitch = buf.get_f32_le()?;
20539        __struct.yaw = buf.get_f32_le()?;
20540        __struct.yaw_absolute = buf.get_f32_le()?;
20541        Ok(__struct)
20542    }
20543    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20544        let mut __tmp = BytesMut::new(bytes);
20545        #[allow(clippy::absurd_extreme_comparisons)]
20546        #[allow(unused_comparisons)]
20547        if __tmp.remaining() < Self::ENCODED_LEN {
20548            panic!(
20549                "buffer is too small (need {} bytes, but got {})",
20550                Self::ENCODED_LEN,
20551                __tmp.remaining(),
20552            )
20553        }
20554        __tmp.put_u32_le(self.time_boot_ms);
20555        __tmp.put_f32_le(self.roll);
20556        __tmp.put_f32_le(self.pitch);
20557        __tmp.put_f32_le(self.yaw);
20558        if matches!(version, MavlinkVersion::V2) {
20559            __tmp.put_f32_le(self.yaw_absolute);
20560            let len = __tmp.len();
20561            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20562        } else {
20563            __tmp.len()
20564        }
20565    }
20566}
20567#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20568#[doc = ""]
20569#[doc = "ID: 251"]
20570#[derive(Debug, Clone, PartialEq)]
20571#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20572#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20573#[cfg_attr(feature = "ts", derive(TS))]
20574#[cfg_attr(feature = "ts", ts(export))]
20575pub struct NAMED_VALUE_FLOAT_DATA {
20576    #[doc = "Timestamp (time since system boot)."]
20577    pub time_boot_ms: u32,
20578    #[doc = "Floating point value"]
20579    pub value: f32,
20580    #[doc = "Name of the debug variable"]
20581    #[cfg_attr(feature = "ts", ts(type = "string"))]
20582    pub name: CharArray<10>,
20583}
20584impl NAMED_VALUE_FLOAT_DATA {
20585    pub const ENCODED_LEN: usize = 18usize;
20586    pub const DEFAULT: Self = Self {
20587        time_boot_ms: 0_u32,
20588        value: 0.0_f32,
20589        name: CharArray::new([0_u8; 10usize]),
20590    };
20591    #[cfg(feature = "arbitrary")]
20592    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20593        use arbitrary::{Arbitrary, Unstructured};
20594        let mut buf = [0u8; 1024];
20595        rng.fill_bytes(&mut buf);
20596        let mut unstructured = Unstructured::new(&buf);
20597        Self::arbitrary(&mut unstructured).unwrap_or_default()
20598    }
20599}
20600impl Default for NAMED_VALUE_FLOAT_DATA {
20601    fn default() -> Self {
20602        Self::DEFAULT.clone()
20603    }
20604}
20605impl MessageData for NAMED_VALUE_FLOAT_DATA {
20606    type Message = MavMessage;
20607    const ID: u32 = 251u32;
20608    const NAME: &'static str = "NAMED_VALUE_FLOAT";
20609    const EXTRA_CRC: u8 = 170u8;
20610    const ENCODED_LEN: usize = 18usize;
20611    fn deser(
20612        _version: MavlinkVersion,
20613        __input: &[u8],
20614    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20615        let avail_len = __input.len();
20616        let mut payload_buf = [0; Self::ENCODED_LEN];
20617        let mut buf = if avail_len < Self::ENCODED_LEN {
20618            payload_buf[0..avail_len].copy_from_slice(__input);
20619            Bytes::new(&payload_buf)
20620        } else {
20621            Bytes::new(__input)
20622        };
20623        let mut __struct = Self::default();
20624        __struct.time_boot_ms = buf.get_u32_le()?;
20625        __struct.value = buf.get_f32_le()?;
20626        let mut tmp = [0_u8; 10usize];
20627        for v in &mut tmp {
20628            *v = buf.get_u8()?;
20629        }
20630        __struct.name = CharArray::new(tmp);
20631        Ok(__struct)
20632    }
20633    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20634        let mut __tmp = BytesMut::new(bytes);
20635        #[allow(clippy::absurd_extreme_comparisons)]
20636        #[allow(unused_comparisons)]
20637        if __tmp.remaining() < Self::ENCODED_LEN {
20638            panic!(
20639                "buffer is too small (need {} bytes, but got {})",
20640                Self::ENCODED_LEN,
20641                __tmp.remaining(),
20642            )
20643        }
20644        __tmp.put_u32_le(self.time_boot_ms);
20645        __tmp.put_f32_le(self.value);
20646        for val in &self.name {
20647            __tmp.put_u8(*val);
20648        }
20649        if matches!(version, MavlinkVersion::V2) {
20650            let len = __tmp.len();
20651            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20652        } else {
20653            __tmp.len()
20654        }
20655    }
20656}
20657#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20658#[doc = ""]
20659#[doc = "ID: 252"]
20660#[derive(Debug, Clone, PartialEq)]
20661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20662#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20663#[cfg_attr(feature = "ts", derive(TS))]
20664#[cfg_attr(feature = "ts", ts(export))]
20665pub struct NAMED_VALUE_INT_DATA {
20666    #[doc = "Timestamp (time since system boot)."]
20667    pub time_boot_ms: u32,
20668    #[doc = "Signed integer value"]
20669    pub value: i32,
20670    #[doc = "Name of the debug variable"]
20671    #[cfg_attr(feature = "ts", ts(type = "string"))]
20672    pub name: CharArray<10>,
20673}
20674impl NAMED_VALUE_INT_DATA {
20675    pub const ENCODED_LEN: usize = 18usize;
20676    pub const DEFAULT: Self = Self {
20677        time_boot_ms: 0_u32,
20678        value: 0_i32,
20679        name: CharArray::new([0_u8; 10usize]),
20680    };
20681    #[cfg(feature = "arbitrary")]
20682    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20683        use arbitrary::{Arbitrary, Unstructured};
20684        let mut buf = [0u8; 1024];
20685        rng.fill_bytes(&mut buf);
20686        let mut unstructured = Unstructured::new(&buf);
20687        Self::arbitrary(&mut unstructured).unwrap_or_default()
20688    }
20689}
20690impl Default for NAMED_VALUE_INT_DATA {
20691    fn default() -> Self {
20692        Self::DEFAULT.clone()
20693    }
20694}
20695impl MessageData for NAMED_VALUE_INT_DATA {
20696    type Message = MavMessage;
20697    const ID: u32 = 252u32;
20698    const NAME: &'static str = "NAMED_VALUE_INT";
20699    const EXTRA_CRC: u8 = 44u8;
20700    const ENCODED_LEN: usize = 18usize;
20701    fn deser(
20702        _version: MavlinkVersion,
20703        __input: &[u8],
20704    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20705        let avail_len = __input.len();
20706        let mut payload_buf = [0; Self::ENCODED_LEN];
20707        let mut buf = if avail_len < Self::ENCODED_LEN {
20708            payload_buf[0..avail_len].copy_from_slice(__input);
20709            Bytes::new(&payload_buf)
20710        } else {
20711            Bytes::new(__input)
20712        };
20713        let mut __struct = Self::default();
20714        __struct.time_boot_ms = buf.get_u32_le()?;
20715        __struct.value = buf.get_i32_le()?;
20716        let mut tmp = [0_u8; 10usize];
20717        for v in &mut tmp {
20718            *v = buf.get_u8()?;
20719        }
20720        __struct.name = CharArray::new(tmp);
20721        Ok(__struct)
20722    }
20723    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20724        let mut __tmp = BytesMut::new(bytes);
20725        #[allow(clippy::absurd_extreme_comparisons)]
20726        #[allow(unused_comparisons)]
20727        if __tmp.remaining() < Self::ENCODED_LEN {
20728            panic!(
20729                "buffer is too small (need {} bytes, but got {})",
20730                Self::ENCODED_LEN,
20731                __tmp.remaining(),
20732            )
20733        }
20734        __tmp.put_u32_le(self.time_boot_ms);
20735        __tmp.put_i32_le(self.value);
20736        for val in &self.name {
20737            __tmp.put_u8(*val);
20738        }
20739        if matches!(version, MavlinkVersion::V2) {
20740            let len = __tmp.len();
20741            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20742        } else {
20743            __tmp.len()
20744        }
20745    }
20746}
20747#[doc = "The state of the navigation and position controller."]
20748#[doc = ""]
20749#[doc = "ID: 62"]
20750#[derive(Debug, Clone, PartialEq)]
20751#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20752#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20753#[cfg_attr(feature = "ts", derive(TS))]
20754#[cfg_attr(feature = "ts", ts(export))]
20755pub struct NAV_CONTROLLER_OUTPUT_DATA {
20756    #[doc = "Current desired roll"]
20757    pub nav_roll: f32,
20758    #[doc = "Current desired pitch"]
20759    pub nav_pitch: f32,
20760    #[doc = "Current altitude error"]
20761    pub alt_error: f32,
20762    #[doc = "Current airspeed error"]
20763    pub aspd_error: f32,
20764    #[doc = "Current crosstrack error on x-y plane"]
20765    pub xtrack_error: f32,
20766    #[doc = "Current desired heading"]
20767    pub nav_bearing: i16,
20768    #[doc = "Bearing to current waypoint/target"]
20769    pub target_bearing: i16,
20770    #[doc = "Distance to active waypoint"]
20771    pub wp_dist: u16,
20772}
20773impl NAV_CONTROLLER_OUTPUT_DATA {
20774    pub const ENCODED_LEN: usize = 26usize;
20775    pub const DEFAULT: Self = Self {
20776        nav_roll: 0.0_f32,
20777        nav_pitch: 0.0_f32,
20778        alt_error: 0.0_f32,
20779        aspd_error: 0.0_f32,
20780        xtrack_error: 0.0_f32,
20781        nav_bearing: 0_i16,
20782        target_bearing: 0_i16,
20783        wp_dist: 0_u16,
20784    };
20785    #[cfg(feature = "arbitrary")]
20786    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20787        use arbitrary::{Arbitrary, Unstructured};
20788        let mut buf = [0u8; 1024];
20789        rng.fill_bytes(&mut buf);
20790        let mut unstructured = Unstructured::new(&buf);
20791        Self::arbitrary(&mut unstructured).unwrap_or_default()
20792    }
20793}
20794impl Default for NAV_CONTROLLER_OUTPUT_DATA {
20795    fn default() -> Self {
20796        Self::DEFAULT.clone()
20797    }
20798}
20799impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
20800    type Message = MavMessage;
20801    const ID: u32 = 62u32;
20802    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
20803    const EXTRA_CRC: u8 = 183u8;
20804    const ENCODED_LEN: usize = 26usize;
20805    fn deser(
20806        _version: MavlinkVersion,
20807        __input: &[u8],
20808    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20809        let avail_len = __input.len();
20810        let mut payload_buf = [0; Self::ENCODED_LEN];
20811        let mut buf = if avail_len < Self::ENCODED_LEN {
20812            payload_buf[0..avail_len].copy_from_slice(__input);
20813            Bytes::new(&payload_buf)
20814        } else {
20815            Bytes::new(__input)
20816        };
20817        let mut __struct = Self::default();
20818        __struct.nav_roll = buf.get_f32_le()?;
20819        __struct.nav_pitch = buf.get_f32_le()?;
20820        __struct.alt_error = buf.get_f32_le()?;
20821        __struct.aspd_error = buf.get_f32_le()?;
20822        __struct.xtrack_error = buf.get_f32_le()?;
20823        __struct.nav_bearing = buf.get_i16_le()?;
20824        __struct.target_bearing = buf.get_i16_le()?;
20825        __struct.wp_dist = buf.get_u16_le()?;
20826        Ok(__struct)
20827    }
20828    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20829        let mut __tmp = BytesMut::new(bytes);
20830        #[allow(clippy::absurd_extreme_comparisons)]
20831        #[allow(unused_comparisons)]
20832        if __tmp.remaining() < Self::ENCODED_LEN {
20833            panic!(
20834                "buffer is too small (need {} bytes, but got {})",
20835                Self::ENCODED_LEN,
20836                __tmp.remaining(),
20837            )
20838        }
20839        __tmp.put_f32_le(self.nav_roll);
20840        __tmp.put_f32_le(self.nav_pitch);
20841        __tmp.put_f32_le(self.alt_error);
20842        __tmp.put_f32_le(self.aspd_error);
20843        __tmp.put_f32_le(self.xtrack_error);
20844        __tmp.put_i16_le(self.nav_bearing);
20845        __tmp.put_i16_le(self.target_bearing);
20846        __tmp.put_u16_le(self.wp_dist);
20847        if matches!(version, MavlinkVersion::V2) {
20848            let len = __tmp.len();
20849            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20850        } else {
20851            __tmp.len()
20852        }
20853    }
20854}
20855#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
20856#[doc = ""]
20857#[doc = "ID: 330"]
20858#[derive(Debug, Clone, PartialEq)]
20859#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20860#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20861#[cfg_attr(feature = "ts", derive(TS))]
20862#[cfg_attr(feature = "ts", ts(export))]
20863pub struct OBSTACLE_DISTANCE_DATA {
20864    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20865    pub time_usec: u64,
20866    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
20867    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20868    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20869    pub distances: [u16; 72],
20870    #[doc = "Minimum distance the sensor can measure."]
20871    pub min_distance: u16,
20872    #[doc = "Maximum distance the sensor can measure."]
20873    pub max_distance: u16,
20874    #[doc = "Class id of the distance sensor type."]
20875    pub sensor_type: MavDistanceSensor,
20876    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
20877    pub increment: u8,
20878    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
20879    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20880    pub increment_f: f32,
20881    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
20882    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20883    pub angle_offset: f32,
20884    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
20885    #[cfg_attr(feature = "serde", serde(default))]
20886    pub frame: MavFrame,
20887}
20888impl OBSTACLE_DISTANCE_DATA {
20889    pub const ENCODED_LEN: usize = 167usize;
20890    pub const DEFAULT: Self = Self {
20891        time_usec: 0_u64,
20892        distances: [0_u16; 72usize],
20893        min_distance: 0_u16,
20894        max_distance: 0_u16,
20895        sensor_type: MavDistanceSensor::DEFAULT,
20896        increment: 0_u8,
20897        increment_f: 0.0_f32,
20898        angle_offset: 0.0_f32,
20899        frame: MavFrame::DEFAULT,
20900    };
20901    #[cfg(feature = "arbitrary")]
20902    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20903        use arbitrary::{Arbitrary, Unstructured};
20904        let mut buf = [0u8; 1024];
20905        rng.fill_bytes(&mut buf);
20906        let mut unstructured = Unstructured::new(&buf);
20907        Self::arbitrary(&mut unstructured).unwrap_or_default()
20908    }
20909}
20910impl Default for OBSTACLE_DISTANCE_DATA {
20911    fn default() -> Self {
20912        Self::DEFAULT.clone()
20913    }
20914}
20915impl MessageData for OBSTACLE_DISTANCE_DATA {
20916    type Message = MavMessage;
20917    const ID: u32 = 330u32;
20918    const NAME: &'static str = "OBSTACLE_DISTANCE";
20919    const EXTRA_CRC: u8 = 23u8;
20920    const ENCODED_LEN: usize = 167usize;
20921    fn deser(
20922        _version: MavlinkVersion,
20923        __input: &[u8],
20924    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20925        let avail_len = __input.len();
20926        let mut payload_buf = [0; Self::ENCODED_LEN];
20927        let mut buf = if avail_len < Self::ENCODED_LEN {
20928            payload_buf[0..avail_len].copy_from_slice(__input);
20929            Bytes::new(&payload_buf)
20930        } else {
20931            Bytes::new(__input)
20932        };
20933        let mut __struct = Self::default();
20934        __struct.time_usec = buf.get_u64_le()?;
20935        for v in &mut __struct.distances {
20936            let val = buf.get_u16_le()?;
20937            *v = val;
20938        }
20939        __struct.min_distance = buf.get_u16_le()?;
20940        __struct.max_distance = buf.get_u16_le()?;
20941        let tmp = buf.get_u8()?;
20942        __struct.sensor_type =
20943            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20944                enum_type: "MavDistanceSensor",
20945                value: tmp as u64,
20946            })?;
20947        __struct.increment = buf.get_u8()?;
20948        __struct.increment_f = buf.get_f32_le()?;
20949        __struct.angle_offset = buf.get_f32_le()?;
20950        let tmp = buf.get_u8()?;
20951        __struct.frame =
20952            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20953                enum_type: "MavFrame",
20954                value: tmp as u64,
20955            })?;
20956        Ok(__struct)
20957    }
20958    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20959        let mut __tmp = BytesMut::new(bytes);
20960        #[allow(clippy::absurd_extreme_comparisons)]
20961        #[allow(unused_comparisons)]
20962        if __tmp.remaining() < Self::ENCODED_LEN {
20963            panic!(
20964                "buffer is too small (need {} bytes, but got {})",
20965                Self::ENCODED_LEN,
20966                __tmp.remaining(),
20967            )
20968        }
20969        __tmp.put_u64_le(self.time_usec);
20970        for val in &self.distances {
20971            __tmp.put_u16_le(*val);
20972        }
20973        __tmp.put_u16_le(self.min_distance);
20974        __tmp.put_u16_le(self.max_distance);
20975        __tmp.put_u8(self.sensor_type as u8);
20976        __tmp.put_u8(self.increment);
20977        if matches!(version, MavlinkVersion::V2) {
20978            __tmp.put_f32_le(self.increment_f);
20979            __tmp.put_f32_le(self.angle_offset);
20980            __tmp.put_u8(self.frame as u8);
20981            let len = __tmp.len();
20982            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20983        } else {
20984            __tmp.len()
20985        }
20986    }
20987}
20988#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
20989#[doc = ""]
20990#[doc = "ID: 331"]
20991#[derive(Debug, Clone, PartialEq)]
20992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20993#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20994#[cfg_attr(feature = "ts", derive(TS))]
20995#[cfg_attr(feature = "ts", ts(export))]
20996pub struct ODOMETRY_DATA {
20997    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20998    pub time_usec: u64,
20999    #[doc = "X Position"]
21000    pub x: f32,
21001    #[doc = "Y Position"]
21002    pub y: f32,
21003    #[doc = "Z Position"]
21004    pub z: f32,
21005    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21006    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21007    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21008    pub q: [f32; 4],
21009    #[doc = "X linear speed"]
21010    pub vx: f32,
21011    #[doc = "Y linear speed"]
21012    pub vy: f32,
21013    #[doc = "Z linear speed"]
21014    pub vz: f32,
21015    #[doc = "Roll angular speed"]
21016    pub rollspeed: f32,
21017    #[doc = "Pitch angular speed"]
21018    pub pitchspeed: f32,
21019    #[doc = "Yaw angular speed"]
21020    pub yawspeed: f32,
21021    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21022    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21023    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21024    pub pose_covariance: [f32; 21],
21025    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21026    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21027    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21028    pub velocity_covariance: [f32; 21],
21029    #[doc = "Coordinate frame of reference for the pose data."]
21030    pub frame_id: MavFrame,
21031    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21032    pub child_frame_id: MavFrame,
21033    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21034    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21035    pub reset_counter: u8,
21036    #[doc = "Type of estimator that is providing the odometry."]
21037    #[cfg_attr(feature = "serde", serde(default))]
21038    pub estimator_type: MavEstimatorType,
21039    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21040    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21041    pub quality: i8,
21042}
21043impl ODOMETRY_DATA {
21044    pub const ENCODED_LEN: usize = 233usize;
21045    pub const DEFAULT: Self = Self {
21046        time_usec: 0_u64,
21047        x: 0.0_f32,
21048        y: 0.0_f32,
21049        z: 0.0_f32,
21050        q: [0.0_f32; 4usize],
21051        vx: 0.0_f32,
21052        vy: 0.0_f32,
21053        vz: 0.0_f32,
21054        rollspeed: 0.0_f32,
21055        pitchspeed: 0.0_f32,
21056        yawspeed: 0.0_f32,
21057        pose_covariance: [0.0_f32; 21usize],
21058        velocity_covariance: [0.0_f32; 21usize],
21059        frame_id: MavFrame::DEFAULT,
21060        child_frame_id: MavFrame::DEFAULT,
21061        reset_counter: 0_u8,
21062        estimator_type: MavEstimatorType::DEFAULT,
21063        quality: 0_i8,
21064    };
21065    #[cfg(feature = "arbitrary")]
21066    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21067        use arbitrary::{Arbitrary, Unstructured};
21068        let mut buf = [0u8; 1024];
21069        rng.fill_bytes(&mut buf);
21070        let mut unstructured = Unstructured::new(&buf);
21071        Self::arbitrary(&mut unstructured).unwrap_or_default()
21072    }
21073}
21074impl Default for ODOMETRY_DATA {
21075    fn default() -> Self {
21076        Self::DEFAULT.clone()
21077    }
21078}
21079impl MessageData for ODOMETRY_DATA {
21080    type Message = MavMessage;
21081    const ID: u32 = 331u32;
21082    const NAME: &'static str = "ODOMETRY";
21083    const EXTRA_CRC: u8 = 91u8;
21084    const ENCODED_LEN: usize = 233usize;
21085    fn deser(
21086        _version: MavlinkVersion,
21087        __input: &[u8],
21088    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21089        let avail_len = __input.len();
21090        let mut payload_buf = [0; Self::ENCODED_LEN];
21091        let mut buf = if avail_len < Self::ENCODED_LEN {
21092            payload_buf[0..avail_len].copy_from_slice(__input);
21093            Bytes::new(&payload_buf)
21094        } else {
21095            Bytes::new(__input)
21096        };
21097        let mut __struct = Self::default();
21098        __struct.time_usec = buf.get_u64_le()?;
21099        __struct.x = buf.get_f32_le()?;
21100        __struct.y = buf.get_f32_le()?;
21101        __struct.z = buf.get_f32_le()?;
21102        for v in &mut __struct.q {
21103            let val = buf.get_f32_le()?;
21104            *v = val;
21105        }
21106        __struct.vx = buf.get_f32_le()?;
21107        __struct.vy = buf.get_f32_le()?;
21108        __struct.vz = buf.get_f32_le()?;
21109        __struct.rollspeed = buf.get_f32_le()?;
21110        __struct.pitchspeed = buf.get_f32_le()?;
21111        __struct.yawspeed = buf.get_f32_le()?;
21112        for v in &mut __struct.pose_covariance {
21113            let val = buf.get_f32_le()?;
21114            *v = val;
21115        }
21116        for v in &mut __struct.velocity_covariance {
21117            let val = buf.get_f32_le()?;
21118            *v = val;
21119        }
21120        let tmp = buf.get_u8()?;
21121        __struct.frame_id =
21122            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21123                enum_type: "MavFrame",
21124                value: tmp as u64,
21125            })?;
21126        let tmp = buf.get_u8()?;
21127        __struct.child_frame_id =
21128            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21129                enum_type: "MavFrame",
21130                value: tmp as u64,
21131            })?;
21132        __struct.reset_counter = buf.get_u8()?;
21133        let tmp = buf.get_u8()?;
21134        __struct.estimator_type =
21135            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21136                enum_type: "MavEstimatorType",
21137                value: tmp as u64,
21138            })?;
21139        __struct.quality = buf.get_i8()?;
21140        Ok(__struct)
21141    }
21142    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21143        let mut __tmp = BytesMut::new(bytes);
21144        #[allow(clippy::absurd_extreme_comparisons)]
21145        #[allow(unused_comparisons)]
21146        if __tmp.remaining() < Self::ENCODED_LEN {
21147            panic!(
21148                "buffer is too small (need {} bytes, but got {})",
21149                Self::ENCODED_LEN,
21150                __tmp.remaining(),
21151            )
21152        }
21153        __tmp.put_u64_le(self.time_usec);
21154        __tmp.put_f32_le(self.x);
21155        __tmp.put_f32_le(self.y);
21156        __tmp.put_f32_le(self.z);
21157        for val in &self.q {
21158            __tmp.put_f32_le(*val);
21159        }
21160        __tmp.put_f32_le(self.vx);
21161        __tmp.put_f32_le(self.vy);
21162        __tmp.put_f32_le(self.vz);
21163        __tmp.put_f32_le(self.rollspeed);
21164        __tmp.put_f32_le(self.pitchspeed);
21165        __tmp.put_f32_le(self.yawspeed);
21166        for val in &self.pose_covariance {
21167            __tmp.put_f32_le(*val);
21168        }
21169        for val in &self.velocity_covariance {
21170            __tmp.put_f32_le(*val);
21171        }
21172        __tmp.put_u8(self.frame_id as u8);
21173        __tmp.put_u8(self.child_frame_id as u8);
21174        if matches!(version, MavlinkVersion::V2) {
21175            __tmp.put_u8(self.reset_counter);
21176            __tmp.put_u8(self.estimator_type as u8);
21177            __tmp.put_i8(self.quality);
21178            let len = __tmp.len();
21179            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21180        } else {
21181            __tmp.len()
21182        }
21183    }
21184}
21185#[doc = "Hardware status sent by an onboard computer."]
21186#[doc = ""]
21187#[doc = "ID: 390"]
21188#[derive(Debug, Clone, PartialEq)]
21189#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21190#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21191#[cfg_attr(feature = "ts", derive(TS))]
21192#[cfg_attr(feature = "ts", ts(export))]
21193pub struct ONBOARD_COMPUTER_STATUS_DATA {
21194    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21195    pub time_usec: u64,
21196    #[doc = "Time since system boot."]
21197    pub uptime: u32,
21198    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21199    pub ram_usage: u32,
21200    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21201    pub ram_total: u32,
21202    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
21203    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21204    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21205    pub storage_type: [u32; 4],
21206    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21207    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21208    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21209    pub storage_usage: [u32; 4],
21210    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21211    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21212    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21213    pub storage_total: [u32; 4],
21214    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
21215    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21216    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21217    pub link_type: [u32; 6],
21218    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
21219    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21220    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21221    pub link_tx_rate: [u32; 6],
21222    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
21223    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21224    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21225    pub link_rx_rate: [u32; 6],
21226    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
21227    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21228    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21229    pub link_tx_max: [u32; 6],
21230    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
21231    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21232    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21233    pub link_rx_max: [u32; 6],
21234    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
21235    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21236    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21237    pub fan_speed: [i16; 4],
21238    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
21239    pub mavtype: u8,
21240    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21241    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21242    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21243    pub cpu_cores: [u8; 8],
21244    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21245    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21246    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21247    pub cpu_combined: [u8; 10],
21248    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21249    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21250    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21251    pub gpu_cores: [u8; 4],
21252    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21253    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21254    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21255    pub gpu_combined: [u8; 10],
21256    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
21257    pub temperature_board: i8,
21258    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
21259    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21260    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21261    pub temperature_core: [i8; 8],
21262}
21263impl ONBOARD_COMPUTER_STATUS_DATA {
21264    pub const ENCODED_LEN: usize = 238usize;
21265    pub const DEFAULT: Self = Self {
21266        time_usec: 0_u64,
21267        uptime: 0_u32,
21268        ram_usage: 0_u32,
21269        ram_total: 0_u32,
21270        storage_type: [0_u32; 4usize],
21271        storage_usage: [0_u32; 4usize],
21272        storage_total: [0_u32; 4usize],
21273        link_type: [0_u32; 6usize],
21274        link_tx_rate: [0_u32; 6usize],
21275        link_rx_rate: [0_u32; 6usize],
21276        link_tx_max: [0_u32; 6usize],
21277        link_rx_max: [0_u32; 6usize],
21278        fan_speed: [0_i16; 4usize],
21279        mavtype: 0_u8,
21280        cpu_cores: [0_u8; 8usize],
21281        cpu_combined: [0_u8; 10usize],
21282        gpu_cores: [0_u8; 4usize],
21283        gpu_combined: [0_u8; 10usize],
21284        temperature_board: 0_i8,
21285        temperature_core: [0_i8; 8usize],
21286    };
21287    #[cfg(feature = "arbitrary")]
21288    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21289        use arbitrary::{Arbitrary, Unstructured};
21290        let mut buf = [0u8; 1024];
21291        rng.fill_bytes(&mut buf);
21292        let mut unstructured = Unstructured::new(&buf);
21293        Self::arbitrary(&mut unstructured).unwrap_or_default()
21294    }
21295}
21296impl Default for ONBOARD_COMPUTER_STATUS_DATA {
21297    fn default() -> Self {
21298        Self::DEFAULT.clone()
21299    }
21300}
21301impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
21302    type Message = MavMessage;
21303    const ID: u32 = 390u32;
21304    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
21305    const EXTRA_CRC: u8 = 156u8;
21306    const ENCODED_LEN: usize = 238usize;
21307    fn deser(
21308        _version: MavlinkVersion,
21309        __input: &[u8],
21310    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21311        let avail_len = __input.len();
21312        let mut payload_buf = [0; Self::ENCODED_LEN];
21313        let mut buf = if avail_len < Self::ENCODED_LEN {
21314            payload_buf[0..avail_len].copy_from_slice(__input);
21315            Bytes::new(&payload_buf)
21316        } else {
21317            Bytes::new(__input)
21318        };
21319        let mut __struct = Self::default();
21320        __struct.time_usec = buf.get_u64_le()?;
21321        __struct.uptime = buf.get_u32_le()?;
21322        __struct.ram_usage = buf.get_u32_le()?;
21323        __struct.ram_total = buf.get_u32_le()?;
21324        for v in &mut __struct.storage_type {
21325            let val = buf.get_u32_le()?;
21326            *v = val;
21327        }
21328        for v in &mut __struct.storage_usage {
21329            let val = buf.get_u32_le()?;
21330            *v = val;
21331        }
21332        for v in &mut __struct.storage_total {
21333            let val = buf.get_u32_le()?;
21334            *v = val;
21335        }
21336        for v in &mut __struct.link_type {
21337            let val = buf.get_u32_le()?;
21338            *v = val;
21339        }
21340        for v in &mut __struct.link_tx_rate {
21341            let val = buf.get_u32_le()?;
21342            *v = val;
21343        }
21344        for v in &mut __struct.link_rx_rate {
21345            let val = buf.get_u32_le()?;
21346            *v = val;
21347        }
21348        for v in &mut __struct.link_tx_max {
21349            let val = buf.get_u32_le()?;
21350            *v = val;
21351        }
21352        for v in &mut __struct.link_rx_max {
21353            let val = buf.get_u32_le()?;
21354            *v = val;
21355        }
21356        for v in &mut __struct.fan_speed {
21357            let val = buf.get_i16_le()?;
21358            *v = val;
21359        }
21360        __struct.mavtype = buf.get_u8()?;
21361        for v in &mut __struct.cpu_cores {
21362            let val = buf.get_u8()?;
21363            *v = val;
21364        }
21365        for v in &mut __struct.cpu_combined {
21366            let val = buf.get_u8()?;
21367            *v = val;
21368        }
21369        for v in &mut __struct.gpu_cores {
21370            let val = buf.get_u8()?;
21371            *v = val;
21372        }
21373        for v in &mut __struct.gpu_combined {
21374            let val = buf.get_u8()?;
21375            *v = val;
21376        }
21377        __struct.temperature_board = buf.get_i8()?;
21378        for v in &mut __struct.temperature_core {
21379            let val = buf.get_i8()?;
21380            *v = val;
21381        }
21382        Ok(__struct)
21383    }
21384    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21385        let mut __tmp = BytesMut::new(bytes);
21386        #[allow(clippy::absurd_extreme_comparisons)]
21387        #[allow(unused_comparisons)]
21388        if __tmp.remaining() < Self::ENCODED_LEN {
21389            panic!(
21390                "buffer is too small (need {} bytes, but got {})",
21391                Self::ENCODED_LEN,
21392                __tmp.remaining(),
21393            )
21394        }
21395        __tmp.put_u64_le(self.time_usec);
21396        __tmp.put_u32_le(self.uptime);
21397        __tmp.put_u32_le(self.ram_usage);
21398        __tmp.put_u32_le(self.ram_total);
21399        for val in &self.storage_type {
21400            __tmp.put_u32_le(*val);
21401        }
21402        for val in &self.storage_usage {
21403            __tmp.put_u32_le(*val);
21404        }
21405        for val in &self.storage_total {
21406            __tmp.put_u32_le(*val);
21407        }
21408        for val in &self.link_type {
21409            __tmp.put_u32_le(*val);
21410        }
21411        for val in &self.link_tx_rate {
21412            __tmp.put_u32_le(*val);
21413        }
21414        for val in &self.link_rx_rate {
21415            __tmp.put_u32_le(*val);
21416        }
21417        for val in &self.link_tx_max {
21418            __tmp.put_u32_le(*val);
21419        }
21420        for val in &self.link_rx_max {
21421            __tmp.put_u32_le(*val);
21422        }
21423        for val in &self.fan_speed {
21424            __tmp.put_i16_le(*val);
21425        }
21426        __tmp.put_u8(self.mavtype);
21427        for val in &self.cpu_cores {
21428            __tmp.put_u8(*val);
21429        }
21430        for val in &self.cpu_combined {
21431            __tmp.put_u8(*val);
21432        }
21433        for val in &self.gpu_cores {
21434            __tmp.put_u8(*val);
21435        }
21436        for val in &self.gpu_combined {
21437            __tmp.put_u8(*val);
21438        }
21439        __tmp.put_i8(self.temperature_board);
21440        for val in &self.temperature_core {
21441            __tmp.put_i8(*val);
21442        }
21443        if matches!(version, MavlinkVersion::V2) {
21444            let len = __tmp.len();
21445            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21446        } else {
21447            __tmp.len()
21448        }
21449    }
21450}
21451#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
21452#[doc = ""]
21453#[doc = "ID: 12918"]
21454#[derive(Debug, Clone, PartialEq)]
21455#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21456#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21457#[cfg_attr(feature = "ts", derive(TS))]
21458#[cfg_attr(feature = "ts", ts(export))]
21459pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
21460    #[doc = "Status level indicating if arming is allowed."]
21461    pub status: MavOdidArmStatus,
21462    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
21463    #[cfg_attr(feature = "ts", ts(type = "string"))]
21464    pub error: CharArray<50>,
21465}
21466impl OPEN_DRONE_ID_ARM_STATUS_DATA {
21467    pub const ENCODED_LEN: usize = 51usize;
21468    pub const DEFAULT: Self = Self {
21469        status: MavOdidArmStatus::DEFAULT,
21470        error: CharArray::new([0_u8; 50usize]),
21471    };
21472    #[cfg(feature = "arbitrary")]
21473    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21474        use arbitrary::{Arbitrary, Unstructured};
21475        let mut buf = [0u8; 1024];
21476        rng.fill_bytes(&mut buf);
21477        let mut unstructured = Unstructured::new(&buf);
21478        Self::arbitrary(&mut unstructured).unwrap_or_default()
21479    }
21480}
21481impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
21482    fn default() -> Self {
21483        Self::DEFAULT.clone()
21484    }
21485}
21486impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
21487    type Message = MavMessage;
21488    const ID: u32 = 12918u32;
21489    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
21490    const EXTRA_CRC: u8 = 139u8;
21491    const ENCODED_LEN: usize = 51usize;
21492    fn deser(
21493        _version: MavlinkVersion,
21494        __input: &[u8],
21495    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21496        let avail_len = __input.len();
21497        let mut payload_buf = [0; Self::ENCODED_LEN];
21498        let mut buf = if avail_len < Self::ENCODED_LEN {
21499            payload_buf[0..avail_len].copy_from_slice(__input);
21500            Bytes::new(&payload_buf)
21501        } else {
21502            Bytes::new(__input)
21503        };
21504        let mut __struct = Self::default();
21505        let tmp = buf.get_u8()?;
21506        __struct.status =
21507            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21508                enum_type: "MavOdidArmStatus",
21509                value: tmp as u64,
21510            })?;
21511        let mut tmp = [0_u8; 50usize];
21512        for v in &mut tmp {
21513            *v = buf.get_u8()?;
21514        }
21515        __struct.error = CharArray::new(tmp);
21516        Ok(__struct)
21517    }
21518    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21519        let mut __tmp = BytesMut::new(bytes);
21520        #[allow(clippy::absurd_extreme_comparisons)]
21521        #[allow(unused_comparisons)]
21522        if __tmp.remaining() < Self::ENCODED_LEN {
21523            panic!(
21524                "buffer is too small (need {} bytes, but got {})",
21525                Self::ENCODED_LEN,
21526                __tmp.remaining(),
21527            )
21528        }
21529        __tmp.put_u8(self.status as u8);
21530        for val in &self.error {
21531            __tmp.put_u8(*val);
21532        }
21533        if matches!(version, MavlinkVersion::V2) {
21534            let len = __tmp.len();
21535            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21536        } else {
21537            __tmp.len()
21538        }
21539    }
21540}
21541#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
21542#[doc = ""]
21543#[doc = "ID: 12902"]
21544#[derive(Debug, Clone, PartialEq)]
21545#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21546#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21547#[cfg_attr(feature = "ts", derive(TS))]
21548#[cfg_attr(feature = "ts", ts(export))]
21549pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
21550    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21551    pub timestamp: u32,
21552    #[doc = "System ID (0 for broadcast)."]
21553    pub target_system: u8,
21554    #[doc = "Component ID (0 for broadcast)."]
21555    pub target_component: u8,
21556    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21557    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21558    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21559    pub id_or_mac: [u8; 20],
21560    #[doc = "Indicates the type of authentication."]
21561    pub authentication_type: MavOdidAuthType,
21562    #[doc = "Allowed range is 0 - 15."]
21563    pub data_page: u8,
21564    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21565    pub last_page_index: u8,
21566    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21567    pub length: u8,
21568    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
21569    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21570    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21571    pub authentication_data: [u8; 23],
21572}
21573impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
21574    pub const ENCODED_LEN: usize = 53usize;
21575    pub const DEFAULT: Self = Self {
21576        timestamp: 0_u32,
21577        target_system: 0_u8,
21578        target_component: 0_u8,
21579        id_or_mac: [0_u8; 20usize],
21580        authentication_type: MavOdidAuthType::DEFAULT,
21581        data_page: 0_u8,
21582        last_page_index: 0_u8,
21583        length: 0_u8,
21584        authentication_data: [0_u8; 23usize],
21585    };
21586    #[cfg(feature = "arbitrary")]
21587    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21588        use arbitrary::{Arbitrary, Unstructured};
21589        let mut buf = [0u8; 1024];
21590        rng.fill_bytes(&mut buf);
21591        let mut unstructured = Unstructured::new(&buf);
21592        Self::arbitrary(&mut unstructured).unwrap_or_default()
21593    }
21594}
21595impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21596    fn default() -> Self {
21597        Self::DEFAULT.clone()
21598    }
21599}
21600impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21601    type Message = MavMessage;
21602    const ID: u32 = 12902u32;
21603    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
21604    const EXTRA_CRC: u8 = 140u8;
21605    const ENCODED_LEN: usize = 53usize;
21606    fn deser(
21607        _version: MavlinkVersion,
21608        __input: &[u8],
21609    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21610        let avail_len = __input.len();
21611        let mut payload_buf = [0; Self::ENCODED_LEN];
21612        let mut buf = if avail_len < Self::ENCODED_LEN {
21613            payload_buf[0..avail_len].copy_from_slice(__input);
21614            Bytes::new(&payload_buf)
21615        } else {
21616            Bytes::new(__input)
21617        };
21618        let mut __struct = Self::default();
21619        __struct.timestamp = buf.get_u32_le()?;
21620        __struct.target_system = buf.get_u8()?;
21621        __struct.target_component = buf.get_u8()?;
21622        for v in &mut __struct.id_or_mac {
21623            let val = buf.get_u8()?;
21624            *v = val;
21625        }
21626        let tmp = buf.get_u8()?;
21627        __struct.authentication_type =
21628            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21629                enum_type: "MavOdidAuthType",
21630                value: tmp as u64,
21631            })?;
21632        __struct.data_page = buf.get_u8()?;
21633        __struct.last_page_index = buf.get_u8()?;
21634        __struct.length = buf.get_u8()?;
21635        for v in &mut __struct.authentication_data {
21636            let val = buf.get_u8()?;
21637            *v = val;
21638        }
21639        Ok(__struct)
21640    }
21641    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21642        let mut __tmp = BytesMut::new(bytes);
21643        #[allow(clippy::absurd_extreme_comparisons)]
21644        #[allow(unused_comparisons)]
21645        if __tmp.remaining() < Self::ENCODED_LEN {
21646            panic!(
21647                "buffer is too small (need {} bytes, but got {})",
21648                Self::ENCODED_LEN,
21649                __tmp.remaining(),
21650            )
21651        }
21652        __tmp.put_u32_le(self.timestamp);
21653        __tmp.put_u8(self.target_system);
21654        __tmp.put_u8(self.target_component);
21655        for val in &self.id_or_mac {
21656            __tmp.put_u8(*val);
21657        }
21658        __tmp.put_u8(self.authentication_type as u8);
21659        __tmp.put_u8(self.data_page);
21660        __tmp.put_u8(self.last_page_index);
21661        __tmp.put_u8(self.length);
21662        for val in &self.authentication_data {
21663            __tmp.put_u8(*val);
21664        }
21665        if matches!(version, MavlinkVersion::V2) {
21666            let len = __tmp.len();
21667            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21668        } else {
21669            __tmp.len()
21670        }
21671    }
21672}
21673#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
21674#[doc = ""]
21675#[doc = "ID: 12900"]
21676#[derive(Debug, Clone, PartialEq)]
21677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21679#[cfg_attr(feature = "ts", derive(TS))]
21680#[cfg_attr(feature = "ts", ts(export))]
21681pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
21682    #[doc = "System ID (0 for broadcast)."]
21683    pub target_system: u8,
21684    #[doc = "Component ID (0 for broadcast)."]
21685    pub target_component: u8,
21686    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21687    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21688    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21689    pub id_or_mac: [u8; 20],
21690    #[doc = "Indicates the format for the uas_id field of this message."]
21691    pub id_type: MavOdidIdType,
21692    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
21693    pub ua_type: MavOdidUaType,
21694    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
21695    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21696    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21697    pub uas_id: [u8; 20],
21698}
21699impl OPEN_DRONE_ID_BASIC_ID_DATA {
21700    pub const ENCODED_LEN: usize = 44usize;
21701    pub const DEFAULT: Self = Self {
21702        target_system: 0_u8,
21703        target_component: 0_u8,
21704        id_or_mac: [0_u8; 20usize],
21705        id_type: MavOdidIdType::DEFAULT,
21706        ua_type: MavOdidUaType::DEFAULT,
21707        uas_id: [0_u8; 20usize],
21708    };
21709    #[cfg(feature = "arbitrary")]
21710    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21711        use arbitrary::{Arbitrary, Unstructured};
21712        let mut buf = [0u8; 1024];
21713        rng.fill_bytes(&mut buf);
21714        let mut unstructured = Unstructured::new(&buf);
21715        Self::arbitrary(&mut unstructured).unwrap_or_default()
21716    }
21717}
21718impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
21719    fn default() -> Self {
21720        Self::DEFAULT.clone()
21721    }
21722}
21723impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
21724    type Message = MavMessage;
21725    const ID: u32 = 12900u32;
21726    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
21727    const EXTRA_CRC: u8 = 114u8;
21728    const ENCODED_LEN: usize = 44usize;
21729    fn deser(
21730        _version: MavlinkVersion,
21731        __input: &[u8],
21732    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21733        let avail_len = __input.len();
21734        let mut payload_buf = [0; Self::ENCODED_LEN];
21735        let mut buf = if avail_len < Self::ENCODED_LEN {
21736            payload_buf[0..avail_len].copy_from_slice(__input);
21737            Bytes::new(&payload_buf)
21738        } else {
21739            Bytes::new(__input)
21740        };
21741        let mut __struct = Self::default();
21742        __struct.target_system = buf.get_u8()?;
21743        __struct.target_component = buf.get_u8()?;
21744        for v in &mut __struct.id_or_mac {
21745            let val = buf.get_u8()?;
21746            *v = val;
21747        }
21748        let tmp = buf.get_u8()?;
21749        __struct.id_type =
21750            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21751                enum_type: "MavOdidIdType",
21752                value: tmp as u64,
21753            })?;
21754        let tmp = buf.get_u8()?;
21755        __struct.ua_type =
21756            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21757                enum_type: "MavOdidUaType",
21758                value: tmp as u64,
21759            })?;
21760        for v in &mut __struct.uas_id {
21761            let val = buf.get_u8()?;
21762            *v = val;
21763        }
21764        Ok(__struct)
21765    }
21766    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21767        let mut __tmp = BytesMut::new(bytes);
21768        #[allow(clippy::absurd_extreme_comparisons)]
21769        #[allow(unused_comparisons)]
21770        if __tmp.remaining() < Self::ENCODED_LEN {
21771            panic!(
21772                "buffer is too small (need {} bytes, but got {})",
21773                Self::ENCODED_LEN,
21774                __tmp.remaining(),
21775            )
21776        }
21777        __tmp.put_u8(self.target_system);
21778        __tmp.put_u8(self.target_component);
21779        for val in &self.id_or_mac {
21780            __tmp.put_u8(*val);
21781        }
21782        __tmp.put_u8(self.id_type as u8);
21783        __tmp.put_u8(self.ua_type as u8);
21784        for val in &self.uas_id {
21785            __tmp.put_u8(*val);
21786        }
21787        if matches!(version, MavlinkVersion::V2) {
21788            let len = __tmp.len();
21789            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21790        } else {
21791            __tmp.len()
21792        }
21793    }
21794}
21795#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
21796#[doc = ""]
21797#[doc = "ID: 12901"]
21798#[derive(Debug, Clone, PartialEq)]
21799#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21801#[cfg_attr(feature = "ts", derive(TS))]
21802#[cfg_attr(feature = "ts", ts(export))]
21803pub struct OPEN_DRONE_ID_LOCATION_DATA {
21804    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21805    pub latitude: i32,
21806    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21807    pub longitude: i32,
21808    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
21809    pub altitude_barometric: f32,
21810    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
21811    pub altitude_geodetic: f32,
21812    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
21813    pub height: f32,
21814    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
21815    pub timestamp: f32,
21816    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
21817    pub direction: u16,
21818    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
21819    pub speed_horizontal: u16,
21820    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
21821    pub speed_vertical: i16,
21822    #[doc = "System ID (0 for broadcast)."]
21823    pub target_system: u8,
21824    #[doc = "Component ID (0 for broadcast)."]
21825    pub target_component: u8,
21826    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21827    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21828    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21829    pub id_or_mac: [u8; 20],
21830    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
21831    pub status: MavOdidStatus,
21832    #[doc = "Indicates the reference point for the height field."]
21833    pub height_reference: MavOdidHeightRef,
21834    #[doc = "The accuracy of the horizontal position."]
21835    pub horizontal_accuracy: MavOdidHorAcc,
21836    #[doc = "The accuracy of the vertical position."]
21837    pub vertical_accuracy: MavOdidVerAcc,
21838    #[doc = "The accuracy of the barometric altitude."]
21839    pub barometer_accuracy: MavOdidVerAcc,
21840    #[doc = "The accuracy of the horizontal and vertical speed."]
21841    pub speed_accuracy: MavOdidSpeedAcc,
21842    #[doc = "The accuracy of the timestamps."]
21843    pub timestamp_accuracy: MavOdidTimeAcc,
21844}
21845impl OPEN_DRONE_ID_LOCATION_DATA {
21846    pub const ENCODED_LEN: usize = 59usize;
21847    pub const DEFAULT: Self = Self {
21848        latitude: 0_i32,
21849        longitude: 0_i32,
21850        altitude_barometric: 0.0_f32,
21851        altitude_geodetic: 0.0_f32,
21852        height: 0.0_f32,
21853        timestamp: 0.0_f32,
21854        direction: 0_u16,
21855        speed_horizontal: 0_u16,
21856        speed_vertical: 0_i16,
21857        target_system: 0_u8,
21858        target_component: 0_u8,
21859        id_or_mac: [0_u8; 20usize],
21860        status: MavOdidStatus::DEFAULT,
21861        height_reference: MavOdidHeightRef::DEFAULT,
21862        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
21863        vertical_accuracy: MavOdidVerAcc::DEFAULT,
21864        barometer_accuracy: MavOdidVerAcc::DEFAULT,
21865        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
21866        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
21867    };
21868    #[cfg(feature = "arbitrary")]
21869    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21870        use arbitrary::{Arbitrary, Unstructured};
21871        let mut buf = [0u8; 1024];
21872        rng.fill_bytes(&mut buf);
21873        let mut unstructured = Unstructured::new(&buf);
21874        Self::arbitrary(&mut unstructured).unwrap_or_default()
21875    }
21876}
21877impl Default for OPEN_DRONE_ID_LOCATION_DATA {
21878    fn default() -> Self {
21879        Self::DEFAULT.clone()
21880    }
21881}
21882impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
21883    type Message = MavMessage;
21884    const ID: u32 = 12901u32;
21885    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
21886    const EXTRA_CRC: u8 = 254u8;
21887    const ENCODED_LEN: usize = 59usize;
21888    fn deser(
21889        _version: MavlinkVersion,
21890        __input: &[u8],
21891    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21892        let avail_len = __input.len();
21893        let mut payload_buf = [0; Self::ENCODED_LEN];
21894        let mut buf = if avail_len < Self::ENCODED_LEN {
21895            payload_buf[0..avail_len].copy_from_slice(__input);
21896            Bytes::new(&payload_buf)
21897        } else {
21898            Bytes::new(__input)
21899        };
21900        let mut __struct = Self::default();
21901        __struct.latitude = buf.get_i32_le()?;
21902        __struct.longitude = buf.get_i32_le()?;
21903        __struct.altitude_barometric = buf.get_f32_le()?;
21904        __struct.altitude_geodetic = buf.get_f32_le()?;
21905        __struct.height = buf.get_f32_le()?;
21906        __struct.timestamp = buf.get_f32_le()?;
21907        __struct.direction = buf.get_u16_le()?;
21908        __struct.speed_horizontal = buf.get_u16_le()?;
21909        __struct.speed_vertical = buf.get_i16_le()?;
21910        __struct.target_system = buf.get_u8()?;
21911        __struct.target_component = buf.get_u8()?;
21912        for v in &mut __struct.id_or_mac {
21913            let val = buf.get_u8()?;
21914            *v = val;
21915        }
21916        let tmp = buf.get_u8()?;
21917        __struct.status =
21918            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21919                enum_type: "MavOdidStatus",
21920                value: tmp as u64,
21921            })?;
21922        let tmp = buf.get_u8()?;
21923        __struct.height_reference =
21924            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21925                enum_type: "MavOdidHeightRef",
21926                value: tmp as u64,
21927            })?;
21928        let tmp = buf.get_u8()?;
21929        __struct.horizontal_accuracy =
21930            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21931                enum_type: "MavOdidHorAcc",
21932                value: tmp as u64,
21933            })?;
21934        let tmp = buf.get_u8()?;
21935        __struct.vertical_accuracy =
21936            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21937                enum_type: "MavOdidVerAcc",
21938                value: tmp as u64,
21939            })?;
21940        let tmp = buf.get_u8()?;
21941        __struct.barometer_accuracy =
21942            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21943                enum_type: "MavOdidVerAcc",
21944                value: tmp as u64,
21945            })?;
21946        let tmp = buf.get_u8()?;
21947        __struct.speed_accuracy =
21948            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21949                enum_type: "MavOdidSpeedAcc",
21950                value: tmp as u64,
21951            })?;
21952        let tmp = buf.get_u8()?;
21953        __struct.timestamp_accuracy =
21954            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21955                enum_type: "MavOdidTimeAcc",
21956                value: tmp as u64,
21957            })?;
21958        Ok(__struct)
21959    }
21960    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21961        let mut __tmp = BytesMut::new(bytes);
21962        #[allow(clippy::absurd_extreme_comparisons)]
21963        #[allow(unused_comparisons)]
21964        if __tmp.remaining() < Self::ENCODED_LEN {
21965            panic!(
21966                "buffer is too small (need {} bytes, but got {})",
21967                Self::ENCODED_LEN,
21968                __tmp.remaining(),
21969            )
21970        }
21971        __tmp.put_i32_le(self.latitude);
21972        __tmp.put_i32_le(self.longitude);
21973        __tmp.put_f32_le(self.altitude_barometric);
21974        __tmp.put_f32_le(self.altitude_geodetic);
21975        __tmp.put_f32_le(self.height);
21976        __tmp.put_f32_le(self.timestamp);
21977        __tmp.put_u16_le(self.direction);
21978        __tmp.put_u16_le(self.speed_horizontal);
21979        __tmp.put_i16_le(self.speed_vertical);
21980        __tmp.put_u8(self.target_system);
21981        __tmp.put_u8(self.target_component);
21982        for val in &self.id_or_mac {
21983            __tmp.put_u8(*val);
21984        }
21985        __tmp.put_u8(self.status as u8);
21986        __tmp.put_u8(self.height_reference as u8);
21987        __tmp.put_u8(self.horizontal_accuracy as u8);
21988        __tmp.put_u8(self.vertical_accuracy as u8);
21989        __tmp.put_u8(self.barometer_accuracy as u8);
21990        __tmp.put_u8(self.speed_accuracy as u8);
21991        __tmp.put_u8(self.timestamp_accuracy as u8);
21992        if matches!(version, MavlinkVersion::V2) {
21993            let len = __tmp.len();
21994            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21995        } else {
21996            __tmp.len()
21997        }
21998    }
21999}
22000#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22001#[doc = ""]
22002#[doc = "ID: 12915"]
22003#[derive(Debug, Clone, PartialEq)]
22004#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22005#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22006#[cfg_attr(feature = "ts", derive(TS))]
22007#[cfg_attr(feature = "ts", ts(export))]
22008pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22009    #[doc = "System ID (0 for broadcast)."]
22010    pub target_system: u8,
22011    #[doc = "Component ID (0 for broadcast)."]
22012    pub target_component: u8,
22013    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22014    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22015    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22016    pub id_or_mac: [u8; 20],
22017    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22018    pub single_message_size: u8,
22019    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22020    pub msg_pack_size: u8,
22021    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22022    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22023    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22024    pub messages: [u8; 225],
22025}
22026impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22027    pub const ENCODED_LEN: usize = 249usize;
22028    pub const DEFAULT: Self = Self {
22029        target_system: 0_u8,
22030        target_component: 0_u8,
22031        id_or_mac: [0_u8; 20usize],
22032        single_message_size: 0_u8,
22033        msg_pack_size: 0_u8,
22034        messages: [0_u8; 225usize],
22035    };
22036    #[cfg(feature = "arbitrary")]
22037    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22038        use arbitrary::{Arbitrary, Unstructured};
22039        let mut buf = [0u8; 1024];
22040        rng.fill_bytes(&mut buf);
22041        let mut unstructured = Unstructured::new(&buf);
22042        Self::arbitrary(&mut unstructured).unwrap_or_default()
22043    }
22044}
22045impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22046    fn default() -> Self {
22047        Self::DEFAULT.clone()
22048    }
22049}
22050impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22051    type Message = MavMessage;
22052    const ID: u32 = 12915u32;
22053    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22054    const EXTRA_CRC: u8 = 94u8;
22055    const ENCODED_LEN: usize = 249usize;
22056    fn deser(
22057        _version: MavlinkVersion,
22058        __input: &[u8],
22059    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22060        let avail_len = __input.len();
22061        let mut payload_buf = [0; Self::ENCODED_LEN];
22062        let mut buf = if avail_len < Self::ENCODED_LEN {
22063            payload_buf[0..avail_len].copy_from_slice(__input);
22064            Bytes::new(&payload_buf)
22065        } else {
22066            Bytes::new(__input)
22067        };
22068        let mut __struct = Self::default();
22069        __struct.target_system = buf.get_u8()?;
22070        __struct.target_component = buf.get_u8()?;
22071        for v in &mut __struct.id_or_mac {
22072            let val = buf.get_u8()?;
22073            *v = val;
22074        }
22075        __struct.single_message_size = buf.get_u8()?;
22076        __struct.msg_pack_size = buf.get_u8()?;
22077        for v in &mut __struct.messages {
22078            let val = buf.get_u8()?;
22079            *v = val;
22080        }
22081        Ok(__struct)
22082    }
22083    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22084        let mut __tmp = BytesMut::new(bytes);
22085        #[allow(clippy::absurd_extreme_comparisons)]
22086        #[allow(unused_comparisons)]
22087        if __tmp.remaining() < Self::ENCODED_LEN {
22088            panic!(
22089                "buffer is too small (need {} bytes, but got {})",
22090                Self::ENCODED_LEN,
22091                __tmp.remaining(),
22092            )
22093        }
22094        __tmp.put_u8(self.target_system);
22095        __tmp.put_u8(self.target_component);
22096        for val in &self.id_or_mac {
22097            __tmp.put_u8(*val);
22098        }
22099        __tmp.put_u8(self.single_message_size);
22100        __tmp.put_u8(self.msg_pack_size);
22101        for val in &self.messages {
22102            __tmp.put_u8(*val);
22103        }
22104        if matches!(version, MavlinkVersion::V2) {
22105            let len = __tmp.len();
22106            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22107        } else {
22108            __tmp.len()
22109        }
22110    }
22111}
22112#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
22113#[doc = ""]
22114#[doc = "ID: 12905"]
22115#[derive(Debug, Clone, PartialEq)]
22116#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22117#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22118#[cfg_attr(feature = "ts", derive(TS))]
22119#[cfg_attr(feature = "ts", ts(export))]
22120pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
22121    #[doc = "System ID (0 for broadcast)."]
22122    pub target_system: u8,
22123    #[doc = "Component ID (0 for broadcast)."]
22124    pub target_component: u8,
22125    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22126    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22127    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22128    pub id_or_mac: [u8; 20],
22129    #[doc = "Indicates the type of the operator_id field."]
22130    pub operator_id_type: MavOdidOperatorIdType,
22131    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22132    #[cfg_attr(feature = "ts", ts(type = "string"))]
22133    pub operator_id: CharArray<20>,
22134}
22135impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
22136    pub const ENCODED_LEN: usize = 43usize;
22137    pub const DEFAULT: Self = Self {
22138        target_system: 0_u8,
22139        target_component: 0_u8,
22140        id_or_mac: [0_u8; 20usize],
22141        operator_id_type: MavOdidOperatorIdType::DEFAULT,
22142        operator_id: CharArray::new([0_u8; 20usize]),
22143    };
22144    #[cfg(feature = "arbitrary")]
22145    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22146        use arbitrary::{Arbitrary, Unstructured};
22147        let mut buf = [0u8; 1024];
22148        rng.fill_bytes(&mut buf);
22149        let mut unstructured = Unstructured::new(&buf);
22150        Self::arbitrary(&mut unstructured).unwrap_or_default()
22151    }
22152}
22153impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22154    fn default() -> Self {
22155        Self::DEFAULT.clone()
22156    }
22157}
22158impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22159    type Message = MavMessage;
22160    const ID: u32 = 12905u32;
22161    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
22162    const EXTRA_CRC: u8 = 49u8;
22163    const ENCODED_LEN: usize = 43usize;
22164    fn deser(
22165        _version: MavlinkVersion,
22166        __input: &[u8],
22167    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22168        let avail_len = __input.len();
22169        let mut payload_buf = [0; Self::ENCODED_LEN];
22170        let mut buf = if avail_len < Self::ENCODED_LEN {
22171            payload_buf[0..avail_len].copy_from_slice(__input);
22172            Bytes::new(&payload_buf)
22173        } else {
22174            Bytes::new(__input)
22175        };
22176        let mut __struct = Self::default();
22177        __struct.target_system = buf.get_u8()?;
22178        __struct.target_component = buf.get_u8()?;
22179        for v in &mut __struct.id_or_mac {
22180            let val = buf.get_u8()?;
22181            *v = val;
22182        }
22183        let tmp = buf.get_u8()?;
22184        __struct.operator_id_type =
22185            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22186                enum_type: "MavOdidOperatorIdType",
22187                value: tmp as u64,
22188            })?;
22189        let mut tmp = [0_u8; 20usize];
22190        for v in &mut tmp {
22191            *v = buf.get_u8()?;
22192        }
22193        __struct.operator_id = CharArray::new(tmp);
22194        Ok(__struct)
22195    }
22196    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22197        let mut __tmp = BytesMut::new(bytes);
22198        #[allow(clippy::absurd_extreme_comparisons)]
22199        #[allow(unused_comparisons)]
22200        if __tmp.remaining() < Self::ENCODED_LEN {
22201            panic!(
22202                "buffer is too small (need {} bytes, but got {})",
22203                Self::ENCODED_LEN,
22204                __tmp.remaining(),
22205            )
22206        }
22207        __tmp.put_u8(self.target_system);
22208        __tmp.put_u8(self.target_component);
22209        for val in &self.id_or_mac {
22210            __tmp.put_u8(*val);
22211        }
22212        __tmp.put_u8(self.operator_id_type as u8);
22213        for val in &self.operator_id {
22214            __tmp.put_u8(*val);
22215        }
22216        if matches!(version, MavlinkVersion::V2) {
22217            let len = __tmp.len();
22218            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22219        } else {
22220            __tmp.len()
22221        }
22222    }
22223}
22224#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
22225#[doc = ""]
22226#[doc = "ID: 12903"]
22227#[derive(Debug, Clone, PartialEq)]
22228#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22229#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22230#[cfg_attr(feature = "ts", derive(TS))]
22231#[cfg_attr(feature = "ts", ts(export))]
22232pub struct OPEN_DRONE_ID_SELF_ID_DATA {
22233    #[doc = "System ID (0 for broadcast)."]
22234    pub target_system: u8,
22235    #[doc = "Component ID (0 for broadcast)."]
22236    pub target_component: u8,
22237    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22238    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22239    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22240    pub id_or_mac: [u8; 20],
22241    #[doc = "Indicates the type of the description field."]
22242    pub description_type: MavOdidDescType,
22243    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22244    #[cfg_attr(feature = "ts", ts(type = "string"))]
22245    pub description: CharArray<23>,
22246}
22247impl OPEN_DRONE_ID_SELF_ID_DATA {
22248    pub const ENCODED_LEN: usize = 46usize;
22249    pub const DEFAULT: Self = Self {
22250        target_system: 0_u8,
22251        target_component: 0_u8,
22252        id_or_mac: [0_u8; 20usize],
22253        description_type: MavOdidDescType::DEFAULT,
22254        description: CharArray::new([0_u8; 23usize]),
22255    };
22256    #[cfg(feature = "arbitrary")]
22257    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22258        use arbitrary::{Arbitrary, Unstructured};
22259        let mut buf = [0u8; 1024];
22260        rng.fill_bytes(&mut buf);
22261        let mut unstructured = Unstructured::new(&buf);
22262        Self::arbitrary(&mut unstructured).unwrap_or_default()
22263    }
22264}
22265impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
22266    fn default() -> Self {
22267        Self::DEFAULT.clone()
22268    }
22269}
22270impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
22271    type Message = MavMessage;
22272    const ID: u32 = 12903u32;
22273    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
22274    const EXTRA_CRC: u8 = 249u8;
22275    const ENCODED_LEN: usize = 46usize;
22276    fn deser(
22277        _version: MavlinkVersion,
22278        __input: &[u8],
22279    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22280        let avail_len = __input.len();
22281        let mut payload_buf = [0; Self::ENCODED_LEN];
22282        let mut buf = if avail_len < Self::ENCODED_LEN {
22283            payload_buf[0..avail_len].copy_from_slice(__input);
22284            Bytes::new(&payload_buf)
22285        } else {
22286            Bytes::new(__input)
22287        };
22288        let mut __struct = Self::default();
22289        __struct.target_system = buf.get_u8()?;
22290        __struct.target_component = buf.get_u8()?;
22291        for v in &mut __struct.id_or_mac {
22292            let val = buf.get_u8()?;
22293            *v = val;
22294        }
22295        let tmp = buf.get_u8()?;
22296        __struct.description_type =
22297            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22298                enum_type: "MavOdidDescType",
22299                value: tmp as u64,
22300            })?;
22301        let mut tmp = [0_u8; 23usize];
22302        for v in &mut tmp {
22303            *v = buf.get_u8()?;
22304        }
22305        __struct.description = CharArray::new(tmp);
22306        Ok(__struct)
22307    }
22308    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22309        let mut __tmp = BytesMut::new(bytes);
22310        #[allow(clippy::absurd_extreme_comparisons)]
22311        #[allow(unused_comparisons)]
22312        if __tmp.remaining() < Self::ENCODED_LEN {
22313            panic!(
22314                "buffer is too small (need {} bytes, but got {})",
22315                Self::ENCODED_LEN,
22316                __tmp.remaining(),
22317            )
22318        }
22319        __tmp.put_u8(self.target_system);
22320        __tmp.put_u8(self.target_component);
22321        for val in &self.id_or_mac {
22322            __tmp.put_u8(*val);
22323        }
22324        __tmp.put_u8(self.description_type as u8);
22325        for val in &self.description {
22326            __tmp.put_u8(*val);
22327        }
22328        if matches!(version, MavlinkVersion::V2) {
22329            let len = __tmp.len();
22330            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22331        } else {
22332            __tmp.len()
22333        }
22334    }
22335}
22336#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
22337#[doc = ""]
22338#[doc = "ID: 12904"]
22339#[derive(Debug, Clone, PartialEq)]
22340#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22342#[cfg_attr(feature = "ts", derive(TS))]
22343#[cfg_attr(feature = "ts", ts(export))]
22344pub struct OPEN_DRONE_ID_SYSTEM_DATA {
22345    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22346    pub operator_latitude: i32,
22347    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22348    pub operator_longitude: i32,
22349    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22350    pub area_ceiling: f32,
22351    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22352    pub area_floor: f32,
22353    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22354    pub operator_altitude_geo: f32,
22355    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22356    pub timestamp: u32,
22357    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
22358    pub area_count: u16,
22359    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
22360    pub area_radius: u16,
22361    #[doc = "System ID (0 for broadcast)."]
22362    pub target_system: u8,
22363    #[doc = "Component ID (0 for broadcast)."]
22364    pub target_component: u8,
22365    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22366    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22367    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22368    pub id_or_mac: [u8; 20],
22369    #[doc = "Specifies the operator location type."]
22370    pub operator_location_type: MavOdidOperatorLocationType,
22371    #[doc = "Specifies the classification type of the UA."]
22372    pub classification_type: MavOdidClassificationType,
22373    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
22374    pub category_eu: MavOdidCategoryEu,
22375    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
22376    pub class_eu: MavOdidClassEu,
22377}
22378impl OPEN_DRONE_ID_SYSTEM_DATA {
22379    pub const ENCODED_LEN: usize = 54usize;
22380    pub const DEFAULT: Self = Self {
22381        operator_latitude: 0_i32,
22382        operator_longitude: 0_i32,
22383        area_ceiling: 0.0_f32,
22384        area_floor: 0.0_f32,
22385        operator_altitude_geo: 0.0_f32,
22386        timestamp: 0_u32,
22387        area_count: 0_u16,
22388        area_radius: 0_u16,
22389        target_system: 0_u8,
22390        target_component: 0_u8,
22391        id_or_mac: [0_u8; 20usize],
22392        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
22393        classification_type: MavOdidClassificationType::DEFAULT,
22394        category_eu: MavOdidCategoryEu::DEFAULT,
22395        class_eu: MavOdidClassEu::DEFAULT,
22396    };
22397    #[cfg(feature = "arbitrary")]
22398    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22399        use arbitrary::{Arbitrary, Unstructured};
22400        let mut buf = [0u8; 1024];
22401        rng.fill_bytes(&mut buf);
22402        let mut unstructured = Unstructured::new(&buf);
22403        Self::arbitrary(&mut unstructured).unwrap_or_default()
22404    }
22405}
22406impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
22407    fn default() -> Self {
22408        Self::DEFAULT.clone()
22409    }
22410}
22411impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
22412    type Message = MavMessage;
22413    const ID: u32 = 12904u32;
22414    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
22415    const EXTRA_CRC: u8 = 77u8;
22416    const ENCODED_LEN: usize = 54usize;
22417    fn deser(
22418        _version: MavlinkVersion,
22419        __input: &[u8],
22420    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22421        let avail_len = __input.len();
22422        let mut payload_buf = [0; Self::ENCODED_LEN];
22423        let mut buf = if avail_len < Self::ENCODED_LEN {
22424            payload_buf[0..avail_len].copy_from_slice(__input);
22425            Bytes::new(&payload_buf)
22426        } else {
22427            Bytes::new(__input)
22428        };
22429        let mut __struct = Self::default();
22430        __struct.operator_latitude = buf.get_i32_le()?;
22431        __struct.operator_longitude = buf.get_i32_le()?;
22432        __struct.area_ceiling = buf.get_f32_le()?;
22433        __struct.area_floor = buf.get_f32_le()?;
22434        __struct.operator_altitude_geo = buf.get_f32_le()?;
22435        __struct.timestamp = buf.get_u32_le()?;
22436        __struct.area_count = buf.get_u16_le()?;
22437        __struct.area_radius = buf.get_u16_le()?;
22438        __struct.target_system = buf.get_u8()?;
22439        __struct.target_component = buf.get_u8()?;
22440        for v in &mut __struct.id_or_mac {
22441            let val = buf.get_u8()?;
22442            *v = val;
22443        }
22444        let tmp = buf.get_u8()?;
22445        __struct.operator_location_type =
22446            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22447                enum_type: "MavOdidOperatorLocationType",
22448                value: tmp as u64,
22449            })?;
22450        let tmp = buf.get_u8()?;
22451        __struct.classification_type =
22452            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22453                enum_type: "MavOdidClassificationType",
22454                value: tmp as u64,
22455            })?;
22456        let tmp = buf.get_u8()?;
22457        __struct.category_eu =
22458            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22459                enum_type: "MavOdidCategoryEu",
22460                value: tmp as u64,
22461            })?;
22462        let tmp = buf.get_u8()?;
22463        __struct.class_eu =
22464            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22465                enum_type: "MavOdidClassEu",
22466                value: tmp as u64,
22467            })?;
22468        Ok(__struct)
22469    }
22470    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22471        let mut __tmp = BytesMut::new(bytes);
22472        #[allow(clippy::absurd_extreme_comparisons)]
22473        #[allow(unused_comparisons)]
22474        if __tmp.remaining() < Self::ENCODED_LEN {
22475            panic!(
22476                "buffer is too small (need {} bytes, but got {})",
22477                Self::ENCODED_LEN,
22478                __tmp.remaining(),
22479            )
22480        }
22481        __tmp.put_i32_le(self.operator_latitude);
22482        __tmp.put_i32_le(self.operator_longitude);
22483        __tmp.put_f32_le(self.area_ceiling);
22484        __tmp.put_f32_le(self.area_floor);
22485        __tmp.put_f32_le(self.operator_altitude_geo);
22486        __tmp.put_u32_le(self.timestamp);
22487        __tmp.put_u16_le(self.area_count);
22488        __tmp.put_u16_le(self.area_radius);
22489        __tmp.put_u8(self.target_system);
22490        __tmp.put_u8(self.target_component);
22491        for val in &self.id_or_mac {
22492            __tmp.put_u8(*val);
22493        }
22494        __tmp.put_u8(self.operator_location_type as u8);
22495        __tmp.put_u8(self.classification_type as u8);
22496        __tmp.put_u8(self.category_eu as u8);
22497        __tmp.put_u8(self.class_eu as u8);
22498        if matches!(version, MavlinkVersion::V2) {
22499            let len = __tmp.len();
22500            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22501        } else {
22502            __tmp.len()
22503        }
22504    }
22505}
22506#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
22507#[doc = ""]
22508#[doc = "ID: 12919"]
22509#[derive(Debug, Clone, PartialEq)]
22510#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22511#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22512#[cfg_attr(feature = "ts", derive(TS))]
22513#[cfg_attr(feature = "ts", ts(export))]
22514pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22515    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22516    pub operator_latitude: i32,
22517    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22518    pub operator_longitude: i32,
22519    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22520    pub operator_altitude_geo: f32,
22521    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22522    pub timestamp: u32,
22523    #[doc = "System ID (0 for broadcast)."]
22524    pub target_system: u8,
22525    #[doc = "Component ID (0 for broadcast)."]
22526    pub target_component: u8,
22527}
22528impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22529    pub const ENCODED_LEN: usize = 18usize;
22530    pub const DEFAULT: Self = Self {
22531        operator_latitude: 0_i32,
22532        operator_longitude: 0_i32,
22533        operator_altitude_geo: 0.0_f32,
22534        timestamp: 0_u32,
22535        target_system: 0_u8,
22536        target_component: 0_u8,
22537    };
22538    #[cfg(feature = "arbitrary")]
22539    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22540        use arbitrary::{Arbitrary, Unstructured};
22541        let mut buf = [0u8; 1024];
22542        rng.fill_bytes(&mut buf);
22543        let mut unstructured = Unstructured::new(&buf);
22544        Self::arbitrary(&mut unstructured).unwrap_or_default()
22545    }
22546}
22547impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22548    fn default() -> Self {
22549        Self::DEFAULT.clone()
22550    }
22551}
22552impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22553    type Message = MavMessage;
22554    const ID: u32 = 12919u32;
22555    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
22556    const EXTRA_CRC: u8 = 7u8;
22557    const ENCODED_LEN: usize = 18usize;
22558    fn deser(
22559        _version: MavlinkVersion,
22560        __input: &[u8],
22561    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22562        let avail_len = __input.len();
22563        let mut payload_buf = [0; Self::ENCODED_LEN];
22564        let mut buf = if avail_len < Self::ENCODED_LEN {
22565            payload_buf[0..avail_len].copy_from_slice(__input);
22566            Bytes::new(&payload_buf)
22567        } else {
22568            Bytes::new(__input)
22569        };
22570        let mut __struct = Self::default();
22571        __struct.operator_latitude = buf.get_i32_le()?;
22572        __struct.operator_longitude = buf.get_i32_le()?;
22573        __struct.operator_altitude_geo = buf.get_f32_le()?;
22574        __struct.timestamp = buf.get_u32_le()?;
22575        __struct.target_system = buf.get_u8()?;
22576        __struct.target_component = buf.get_u8()?;
22577        Ok(__struct)
22578    }
22579    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22580        let mut __tmp = BytesMut::new(bytes);
22581        #[allow(clippy::absurd_extreme_comparisons)]
22582        #[allow(unused_comparisons)]
22583        if __tmp.remaining() < Self::ENCODED_LEN {
22584            panic!(
22585                "buffer is too small (need {} bytes, but got {})",
22586                Self::ENCODED_LEN,
22587                __tmp.remaining(),
22588            )
22589        }
22590        __tmp.put_i32_le(self.operator_latitude);
22591        __tmp.put_i32_le(self.operator_longitude);
22592        __tmp.put_f32_le(self.operator_altitude_geo);
22593        __tmp.put_u32_le(self.timestamp);
22594        __tmp.put_u8(self.target_system);
22595        __tmp.put_u8(self.target_component);
22596        if matches!(version, MavlinkVersion::V2) {
22597            let len = __tmp.len();
22598            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22599        } else {
22600            __tmp.len()
22601        }
22602    }
22603}
22604#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
22605#[doc = ""]
22606#[doc = "ID: 100"]
22607#[derive(Debug, Clone, PartialEq)]
22608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22609#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22610#[cfg_attr(feature = "ts", derive(TS))]
22611#[cfg_attr(feature = "ts", ts(export))]
22612pub struct OPTICAL_FLOW_DATA {
22613    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22614    pub time_usec: u64,
22615    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
22616    pub flow_comp_m_x: f32,
22617    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
22618    pub flow_comp_m_y: f32,
22619    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
22620    pub ground_distance: f32,
22621    #[doc = "Flow in x-sensor direction"]
22622    pub flow_x: i16,
22623    #[doc = "Flow in y-sensor direction"]
22624    pub flow_y: i16,
22625    #[doc = "Sensor ID"]
22626    pub sensor_id: u8,
22627    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
22628    pub quality: u8,
22629    #[doc = "Flow rate about X axis"]
22630    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22631    pub flow_rate_x: f32,
22632    #[doc = "Flow rate about Y axis"]
22633    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22634    pub flow_rate_y: f32,
22635}
22636impl OPTICAL_FLOW_DATA {
22637    pub const ENCODED_LEN: usize = 34usize;
22638    pub const DEFAULT: Self = Self {
22639        time_usec: 0_u64,
22640        flow_comp_m_x: 0.0_f32,
22641        flow_comp_m_y: 0.0_f32,
22642        ground_distance: 0.0_f32,
22643        flow_x: 0_i16,
22644        flow_y: 0_i16,
22645        sensor_id: 0_u8,
22646        quality: 0_u8,
22647        flow_rate_x: 0.0_f32,
22648        flow_rate_y: 0.0_f32,
22649    };
22650    #[cfg(feature = "arbitrary")]
22651    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22652        use arbitrary::{Arbitrary, Unstructured};
22653        let mut buf = [0u8; 1024];
22654        rng.fill_bytes(&mut buf);
22655        let mut unstructured = Unstructured::new(&buf);
22656        Self::arbitrary(&mut unstructured).unwrap_or_default()
22657    }
22658}
22659impl Default for OPTICAL_FLOW_DATA {
22660    fn default() -> Self {
22661        Self::DEFAULT.clone()
22662    }
22663}
22664impl MessageData for OPTICAL_FLOW_DATA {
22665    type Message = MavMessage;
22666    const ID: u32 = 100u32;
22667    const NAME: &'static str = "OPTICAL_FLOW";
22668    const EXTRA_CRC: u8 = 175u8;
22669    const ENCODED_LEN: usize = 34usize;
22670    fn deser(
22671        _version: MavlinkVersion,
22672        __input: &[u8],
22673    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22674        let avail_len = __input.len();
22675        let mut payload_buf = [0; Self::ENCODED_LEN];
22676        let mut buf = if avail_len < Self::ENCODED_LEN {
22677            payload_buf[0..avail_len].copy_from_slice(__input);
22678            Bytes::new(&payload_buf)
22679        } else {
22680            Bytes::new(__input)
22681        };
22682        let mut __struct = Self::default();
22683        __struct.time_usec = buf.get_u64_le()?;
22684        __struct.flow_comp_m_x = buf.get_f32_le()?;
22685        __struct.flow_comp_m_y = buf.get_f32_le()?;
22686        __struct.ground_distance = buf.get_f32_le()?;
22687        __struct.flow_x = buf.get_i16_le()?;
22688        __struct.flow_y = buf.get_i16_le()?;
22689        __struct.sensor_id = buf.get_u8()?;
22690        __struct.quality = buf.get_u8()?;
22691        __struct.flow_rate_x = buf.get_f32_le()?;
22692        __struct.flow_rate_y = buf.get_f32_le()?;
22693        Ok(__struct)
22694    }
22695    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22696        let mut __tmp = BytesMut::new(bytes);
22697        #[allow(clippy::absurd_extreme_comparisons)]
22698        #[allow(unused_comparisons)]
22699        if __tmp.remaining() < Self::ENCODED_LEN {
22700            panic!(
22701                "buffer is too small (need {} bytes, but got {})",
22702                Self::ENCODED_LEN,
22703                __tmp.remaining(),
22704            )
22705        }
22706        __tmp.put_u64_le(self.time_usec);
22707        __tmp.put_f32_le(self.flow_comp_m_x);
22708        __tmp.put_f32_le(self.flow_comp_m_y);
22709        __tmp.put_f32_le(self.ground_distance);
22710        __tmp.put_i16_le(self.flow_x);
22711        __tmp.put_i16_le(self.flow_y);
22712        __tmp.put_u8(self.sensor_id);
22713        __tmp.put_u8(self.quality);
22714        if matches!(version, MavlinkVersion::V2) {
22715            __tmp.put_f32_le(self.flow_rate_x);
22716            __tmp.put_f32_le(self.flow_rate_y);
22717            let len = __tmp.len();
22718            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22719        } else {
22720            __tmp.len()
22721        }
22722    }
22723}
22724#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
22725#[doc = ""]
22726#[doc = "ID: 106"]
22727#[derive(Debug, Clone, PartialEq)]
22728#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22729#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22730#[cfg_attr(feature = "ts", derive(TS))]
22731#[cfg_attr(feature = "ts", ts(export))]
22732pub struct OPTICAL_FLOW_RAD_DATA {
22733    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22734    pub time_usec: u64,
22735    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
22736    pub integration_time_us: u32,
22737    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
22738    pub integrated_x: f32,
22739    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
22740    pub integrated_y: f32,
22741    #[doc = "RH rotation around X axis"]
22742    pub integrated_xgyro: f32,
22743    #[doc = "RH rotation around Y axis"]
22744    pub integrated_ygyro: f32,
22745    #[doc = "RH rotation around Z axis"]
22746    pub integrated_zgyro: f32,
22747    #[doc = "Time since the distance was sampled."]
22748    pub time_delta_distance_us: u32,
22749    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
22750    pub distance: f32,
22751    #[doc = "Temperature"]
22752    pub temperature: i16,
22753    #[doc = "Sensor ID"]
22754    pub sensor_id: u8,
22755    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
22756    pub quality: u8,
22757}
22758impl OPTICAL_FLOW_RAD_DATA {
22759    pub const ENCODED_LEN: usize = 44usize;
22760    pub const DEFAULT: Self = Self {
22761        time_usec: 0_u64,
22762        integration_time_us: 0_u32,
22763        integrated_x: 0.0_f32,
22764        integrated_y: 0.0_f32,
22765        integrated_xgyro: 0.0_f32,
22766        integrated_ygyro: 0.0_f32,
22767        integrated_zgyro: 0.0_f32,
22768        time_delta_distance_us: 0_u32,
22769        distance: 0.0_f32,
22770        temperature: 0_i16,
22771        sensor_id: 0_u8,
22772        quality: 0_u8,
22773    };
22774    #[cfg(feature = "arbitrary")]
22775    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22776        use arbitrary::{Arbitrary, Unstructured};
22777        let mut buf = [0u8; 1024];
22778        rng.fill_bytes(&mut buf);
22779        let mut unstructured = Unstructured::new(&buf);
22780        Self::arbitrary(&mut unstructured).unwrap_or_default()
22781    }
22782}
22783impl Default for OPTICAL_FLOW_RAD_DATA {
22784    fn default() -> Self {
22785        Self::DEFAULT.clone()
22786    }
22787}
22788impl MessageData for OPTICAL_FLOW_RAD_DATA {
22789    type Message = MavMessage;
22790    const ID: u32 = 106u32;
22791    const NAME: &'static str = "OPTICAL_FLOW_RAD";
22792    const EXTRA_CRC: u8 = 138u8;
22793    const ENCODED_LEN: usize = 44usize;
22794    fn deser(
22795        _version: MavlinkVersion,
22796        __input: &[u8],
22797    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22798        let avail_len = __input.len();
22799        let mut payload_buf = [0; Self::ENCODED_LEN];
22800        let mut buf = if avail_len < Self::ENCODED_LEN {
22801            payload_buf[0..avail_len].copy_from_slice(__input);
22802            Bytes::new(&payload_buf)
22803        } else {
22804            Bytes::new(__input)
22805        };
22806        let mut __struct = Self::default();
22807        __struct.time_usec = buf.get_u64_le()?;
22808        __struct.integration_time_us = buf.get_u32_le()?;
22809        __struct.integrated_x = buf.get_f32_le()?;
22810        __struct.integrated_y = buf.get_f32_le()?;
22811        __struct.integrated_xgyro = buf.get_f32_le()?;
22812        __struct.integrated_ygyro = buf.get_f32_le()?;
22813        __struct.integrated_zgyro = buf.get_f32_le()?;
22814        __struct.time_delta_distance_us = buf.get_u32_le()?;
22815        __struct.distance = buf.get_f32_le()?;
22816        __struct.temperature = buf.get_i16_le()?;
22817        __struct.sensor_id = buf.get_u8()?;
22818        __struct.quality = buf.get_u8()?;
22819        Ok(__struct)
22820    }
22821    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22822        let mut __tmp = BytesMut::new(bytes);
22823        #[allow(clippy::absurd_extreme_comparisons)]
22824        #[allow(unused_comparisons)]
22825        if __tmp.remaining() < Self::ENCODED_LEN {
22826            panic!(
22827                "buffer is too small (need {} bytes, but got {})",
22828                Self::ENCODED_LEN,
22829                __tmp.remaining(),
22830            )
22831        }
22832        __tmp.put_u64_le(self.time_usec);
22833        __tmp.put_u32_le(self.integration_time_us);
22834        __tmp.put_f32_le(self.integrated_x);
22835        __tmp.put_f32_le(self.integrated_y);
22836        __tmp.put_f32_le(self.integrated_xgyro);
22837        __tmp.put_f32_le(self.integrated_ygyro);
22838        __tmp.put_f32_le(self.integrated_zgyro);
22839        __tmp.put_u32_le(self.time_delta_distance_us);
22840        __tmp.put_f32_le(self.distance);
22841        __tmp.put_i16_le(self.temperature);
22842        __tmp.put_u8(self.sensor_id);
22843        __tmp.put_u8(self.quality);
22844        if matches!(version, MavlinkVersion::V2) {
22845            let len = __tmp.len();
22846            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22847        } else {
22848            __tmp.len()
22849        }
22850    }
22851}
22852#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
22853#[doc = ""]
22854#[doc = "ID: 360"]
22855#[derive(Debug, Clone, PartialEq)]
22856#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22858#[cfg_attr(feature = "ts", derive(TS))]
22859#[cfg_attr(feature = "ts", ts(export))]
22860pub struct ORBIT_EXECUTION_STATUS_DATA {
22861    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22862    pub time_usec: u64,
22863    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
22864    pub radius: f32,
22865    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22866    pub x: i32,
22867    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22868    pub y: i32,
22869    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
22870    pub z: f32,
22871    #[doc = "The coordinate system of the fields: x, y, z."]
22872    pub frame: MavFrame,
22873}
22874impl ORBIT_EXECUTION_STATUS_DATA {
22875    pub const ENCODED_LEN: usize = 25usize;
22876    pub const DEFAULT: Self = Self {
22877        time_usec: 0_u64,
22878        radius: 0.0_f32,
22879        x: 0_i32,
22880        y: 0_i32,
22881        z: 0.0_f32,
22882        frame: MavFrame::DEFAULT,
22883    };
22884    #[cfg(feature = "arbitrary")]
22885    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22886        use arbitrary::{Arbitrary, Unstructured};
22887        let mut buf = [0u8; 1024];
22888        rng.fill_bytes(&mut buf);
22889        let mut unstructured = Unstructured::new(&buf);
22890        Self::arbitrary(&mut unstructured).unwrap_or_default()
22891    }
22892}
22893impl Default for ORBIT_EXECUTION_STATUS_DATA {
22894    fn default() -> Self {
22895        Self::DEFAULT.clone()
22896    }
22897}
22898impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
22899    type Message = MavMessage;
22900    const ID: u32 = 360u32;
22901    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
22902    const EXTRA_CRC: u8 = 11u8;
22903    const ENCODED_LEN: usize = 25usize;
22904    fn deser(
22905        _version: MavlinkVersion,
22906        __input: &[u8],
22907    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22908        let avail_len = __input.len();
22909        let mut payload_buf = [0; Self::ENCODED_LEN];
22910        let mut buf = if avail_len < Self::ENCODED_LEN {
22911            payload_buf[0..avail_len].copy_from_slice(__input);
22912            Bytes::new(&payload_buf)
22913        } else {
22914            Bytes::new(__input)
22915        };
22916        let mut __struct = Self::default();
22917        __struct.time_usec = buf.get_u64_le()?;
22918        __struct.radius = buf.get_f32_le()?;
22919        __struct.x = buf.get_i32_le()?;
22920        __struct.y = buf.get_i32_le()?;
22921        __struct.z = buf.get_f32_le()?;
22922        let tmp = buf.get_u8()?;
22923        __struct.frame =
22924            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22925                enum_type: "MavFrame",
22926                value: tmp as u64,
22927            })?;
22928        Ok(__struct)
22929    }
22930    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22931        let mut __tmp = BytesMut::new(bytes);
22932        #[allow(clippy::absurd_extreme_comparisons)]
22933        #[allow(unused_comparisons)]
22934        if __tmp.remaining() < Self::ENCODED_LEN {
22935            panic!(
22936                "buffer is too small (need {} bytes, but got {})",
22937                Self::ENCODED_LEN,
22938                __tmp.remaining(),
22939            )
22940        }
22941        __tmp.put_u64_le(self.time_usec);
22942        __tmp.put_f32_le(self.radius);
22943        __tmp.put_i32_le(self.x);
22944        __tmp.put_i32_le(self.y);
22945        __tmp.put_f32_le(self.z);
22946        __tmp.put_u8(self.frame as u8);
22947        if matches!(version, MavlinkVersion::V2) {
22948            let len = __tmp.len();
22949            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22950        } else {
22951            __tmp.len()
22952        }
22953    }
22954}
22955#[doc = "Response from a PARAM_EXT_SET message."]
22956#[doc = ""]
22957#[doc = "ID: 324"]
22958#[derive(Debug, Clone, PartialEq)]
22959#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22960#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22961#[cfg_attr(feature = "ts", derive(TS))]
22962#[cfg_attr(feature = "ts", ts(export))]
22963pub struct PARAM_EXT_ACK_DATA {
22964    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22965    #[cfg_attr(feature = "ts", ts(type = "string"))]
22966    pub param_id: CharArray<16>,
22967    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
22968    #[cfg_attr(feature = "ts", ts(type = "string"))]
22969    pub param_value: CharArray<128>,
22970    #[doc = "Parameter type."]
22971    pub param_type: MavParamExtType,
22972    #[doc = "Result code."]
22973    pub param_result: ParamAck,
22974}
22975impl PARAM_EXT_ACK_DATA {
22976    pub const ENCODED_LEN: usize = 146usize;
22977    pub const DEFAULT: Self = Self {
22978        param_id: CharArray::new([0_u8; 16usize]),
22979        param_value: CharArray::new([0_u8; 128usize]),
22980        param_type: MavParamExtType::DEFAULT,
22981        param_result: ParamAck::DEFAULT,
22982    };
22983    #[cfg(feature = "arbitrary")]
22984    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22985        use arbitrary::{Arbitrary, Unstructured};
22986        let mut buf = [0u8; 1024];
22987        rng.fill_bytes(&mut buf);
22988        let mut unstructured = Unstructured::new(&buf);
22989        Self::arbitrary(&mut unstructured).unwrap_or_default()
22990    }
22991}
22992impl Default for PARAM_EXT_ACK_DATA {
22993    fn default() -> Self {
22994        Self::DEFAULT.clone()
22995    }
22996}
22997impl MessageData for PARAM_EXT_ACK_DATA {
22998    type Message = MavMessage;
22999    const ID: u32 = 324u32;
23000    const NAME: &'static str = "PARAM_EXT_ACK";
23001    const EXTRA_CRC: u8 = 132u8;
23002    const ENCODED_LEN: usize = 146usize;
23003    fn deser(
23004        _version: MavlinkVersion,
23005        __input: &[u8],
23006    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23007        let avail_len = __input.len();
23008        let mut payload_buf = [0; Self::ENCODED_LEN];
23009        let mut buf = if avail_len < Self::ENCODED_LEN {
23010            payload_buf[0..avail_len].copy_from_slice(__input);
23011            Bytes::new(&payload_buf)
23012        } else {
23013            Bytes::new(__input)
23014        };
23015        let mut __struct = Self::default();
23016        let mut tmp = [0_u8; 16usize];
23017        for v in &mut tmp {
23018            *v = buf.get_u8()?;
23019        }
23020        __struct.param_id = CharArray::new(tmp);
23021        let mut tmp = [0_u8; 128usize];
23022        for v in &mut tmp {
23023            *v = buf.get_u8()?;
23024        }
23025        __struct.param_value = CharArray::new(tmp);
23026        let tmp = buf.get_u8()?;
23027        __struct.param_type =
23028            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23029                enum_type: "MavParamExtType",
23030                value: tmp as u64,
23031            })?;
23032        let tmp = buf.get_u8()?;
23033        __struct.param_result =
23034            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23035                enum_type: "ParamAck",
23036                value: tmp as u64,
23037            })?;
23038        Ok(__struct)
23039    }
23040    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23041        let mut __tmp = BytesMut::new(bytes);
23042        #[allow(clippy::absurd_extreme_comparisons)]
23043        #[allow(unused_comparisons)]
23044        if __tmp.remaining() < Self::ENCODED_LEN {
23045            panic!(
23046                "buffer is too small (need {} bytes, but got {})",
23047                Self::ENCODED_LEN,
23048                __tmp.remaining(),
23049            )
23050        }
23051        for val in &self.param_id {
23052            __tmp.put_u8(*val);
23053        }
23054        for val in &self.param_value {
23055            __tmp.put_u8(*val);
23056        }
23057        __tmp.put_u8(self.param_type as u8);
23058        __tmp.put_u8(self.param_result as u8);
23059        if matches!(version, MavlinkVersion::V2) {
23060            let len = __tmp.len();
23061            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23062        } else {
23063            __tmp.len()
23064        }
23065    }
23066}
23067#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
23068#[doc = ""]
23069#[doc = "ID: 321"]
23070#[derive(Debug, Clone, PartialEq)]
23071#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23072#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23073#[cfg_attr(feature = "ts", derive(TS))]
23074#[cfg_attr(feature = "ts", ts(export))]
23075pub struct PARAM_EXT_REQUEST_LIST_DATA {
23076    #[doc = "System ID"]
23077    pub target_system: u8,
23078    #[doc = "Component ID"]
23079    pub target_component: u8,
23080}
23081impl PARAM_EXT_REQUEST_LIST_DATA {
23082    pub const ENCODED_LEN: usize = 2usize;
23083    pub const DEFAULT: Self = Self {
23084        target_system: 0_u8,
23085        target_component: 0_u8,
23086    };
23087    #[cfg(feature = "arbitrary")]
23088    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23089        use arbitrary::{Arbitrary, Unstructured};
23090        let mut buf = [0u8; 1024];
23091        rng.fill_bytes(&mut buf);
23092        let mut unstructured = Unstructured::new(&buf);
23093        Self::arbitrary(&mut unstructured).unwrap_or_default()
23094    }
23095}
23096impl Default for PARAM_EXT_REQUEST_LIST_DATA {
23097    fn default() -> Self {
23098        Self::DEFAULT.clone()
23099    }
23100}
23101impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
23102    type Message = MavMessage;
23103    const ID: u32 = 321u32;
23104    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
23105    const EXTRA_CRC: u8 = 88u8;
23106    const ENCODED_LEN: usize = 2usize;
23107    fn deser(
23108        _version: MavlinkVersion,
23109        __input: &[u8],
23110    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23111        let avail_len = __input.len();
23112        let mut payload_buf = [0; Self::ENCODED_LEN];
23113        let mut buf = if avail_len < Self::ENCODED_LEN {
23114            payload_buf[0..avail_len].copy_from_slice(__input);
23115            Bytes::new(&payload_buf)
23116        } else {
23117            Bytes::new(__input)
23118        };
23119        let mut __struct = Self::default();
23120        __struct.target_system = buf.get_u8()?;
23121        __struct.target_component = buf.get_u8()?;
23122        Ok(__struct)
23123    }
23124    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23125        let mut __tmp = BytesMut::new(bytes);
23126        #[allow(clippy::absurd_extreme_comparisons)]
23127        #[allow(unused_comparisons)]
23128        if __tmp.remaining() < Self::ENCODED_LEN {
23129            panic!(
23130                "buffer is too small (need {} bytes, but got {})",
23131                Self::ENCODED_LEN,
23132                __tmp.remaining(),
23133            )
23134        }
23135        __tmp.put_u8(self.target_system);
23136        __tmp.put_u8(self.target_component);
23137        if matches!(version, MavlinkVersion::V2) {
23138            let len = __tmp.len();
23139            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23140        } else {
23141            __tmp.len()
23142        }
23143    }
23144}
23145#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
23146#[doc = ""]
23147#[doc = "ID: 320"]
23148#[derive(Debug, Clone, PartialEq)]
23149#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23150#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23151#[cfg_attr(feature = "ts", derive(TS))]
23152#[cfg_attr(feature = "ts", ts(export))]
23153pub struct PARAM_EXT_REQUEST_READ_DATA {
23154    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
23155    pub param_index: i16,
23156    #[doc = "System ID"]
23157    pub target_system: u8,
23158    #[doc = "Component ID"]
23159    pub target_component: u8,
23160    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23161    #[cfg_attr(feature = "ts", ts(type = "string"))]
23162    pub param_id: CharArray<16>,
23163}
23164impl PARAM_EXT_REQUEST_READ_DATA {
23165    pub const ENCODED_LEN: usize = 20usize;
23166    pub const DEFAULT: Self = Self {
23167        param_index: 0_i16,
23168        target_system: 0_u8,
23169        target_component: 0_u8,
23170        param_id: CharArray::new([0_u8; 16usize]),
23171    };
23172    #[cfg(feature = "arbitrary")]
23173    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23174        use arbitrary::{Arbitrary, Unstructured};
23175        let mut buf = [0u8; 1024];
23176        rng.fill_bytes(&mut buf);
23177        let mut unstructured = Unstructured::new(&buf);
23178        Self::arbitrary(&mut unstructured).unwrap_or_default()
23179    }
23180}
23181impl Default for PARAM_EXT_REQUEST_READ_DATA {
23182    fn default() -> Self {
23183        Self::DEFAULT.clone()
23184    }
23185}
23186impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
23187    type Message = MavMessage;
23188    const ID: u32 = 320u32;
23189    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
23190    const EXTRA_CRC: u8 = 243u8;
23191    const ENCODED_LEN: usize = 20usize;
23192    fn deser(
23193        _version: MavlinkVersion,
23194        __input: &[u8],
23195    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23196        let avail_len = __input.len();
23197        let mut payload_buf = [0; Self::ENCODED_LEN];
23198        let mut buf = if avail_len < Self::ENCODED_LEN {
23199            payload_buf[0..avail_len].copy_from_slice(__input);
23200            Bytes::new(&payload_buf)
23201        } else {
23202            Bytes::new(__input)
23203        };
23204        let mut __struct = Self::default();
23205        __struct.param_index = buf.get_i16_le()?;
23206        __struct.target_system = buf.get_u8()?;
23207        __struct.target_component = buf.get_u8()?;
23208        let mut tmp = [0_u8; 16usize];
23209        for v in &mut tmp {
23210            *v = buf.get_u8()?;
23211        }
23212        __struct.param_id = CharArray::new(tmp);
23213        Ok(__struct)
23214    }
23215    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23216        let mut __tmp = BytesMut::new(bytes);
23217        #[allow(clippy::absurd_extreme_comparisons)]
23218        #[allow(unused_comparisons)]
23219        if __tmp.remaining() < Self::ENCODED_LEN {
23220            panic!(
23221                "buffer is too small (need {} bytes, but got {})",
23222                Self::ENCODED_LEN,
23223                __tmp.remaining(),
23224            )
23225        }
23226        __tmp.put_i16_le(self.param_index);
23227        __tmp.put_u8(self.target_system);
23228        __tmp.put_u8(self.target_component);
23229        for val in &self.param_id {
23230            __tmp.put_u8(*val);
23231        }
23232        if matches!(version, MavlinkVersion::V2) {
23233            let len = __tmp.len();
23234            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23235        } else {
23236            __tmp.len()
23237        }
23238    }
23239}
23240#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
23241#[doc = ""]
23242#[doc = "ID: 323"]
23243#[derive(Debug, Clone, PartialEq)]
23244#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23245#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23246#[cfg_attr(feature = "ts", derive(TS))]
23247#[cfg_attr(feature = "ts", ts(export))]
23248pub struct PARAM_EXT_SET_DATA {
23249    #[doc = "System ID"]
23250    pub target_system: u8,
23251    #[doc = "Component ID"]
23252    pub target_component: u8,
23253    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23254    #[cfg_attr(feature = "ts", ts(type = "string"))]
23255    pub param_id: CharArray<16>,
23256    #[doc = "Parameter value"]
23257    #[cfg_attr(feature = "ts", ts(type = "string"))]
23258    pub param_value: CharArray<128>,
23259    #[doc = "Parameter type."]
23260    pub param_type: MavParamExtType,
23261}
23262impl PARAM_EXT_SET_DATA {
23263    pub const ENCODED_LEN: usize = 147usize;
23264    pub const DEFAULT: Self = Self {
23265        target_system: 0_u8,
23266        target_component: 0_u8,
23267        param_id: CharArray::new([0_u8; 16usize]),
23268        param_value: CharArray::new([0_u8; 128usize]),
23269        param_type: MavParamExtType::DEFAULT,
23270    };
23271    #[cfg(feature = "arbitrary")]
23272    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23273        use arbitrary::{Arbitrary, Unstructured};
23274        let mut buf = [0u8; 1024];
23275        rng.fill_bytes(&mut buf);
23276        let mut unstructured = Unstructured::new(&buf);
23277        Self::arbitrary(&mut unstructured).unwrap_or_default()
23278    }
23279}
23280impl Default for PARAM_EXT_SET_DATA {
23281    fn default() -> Self {
23282        Self::DEFAULT.clone()
23283    }
23284}
23285impl MessageData for PARAM_EXT_SET_DATA {
23286    type Message = MavMessage;
23287    const ID: u32 = 323u32;
23288    const NAME: &'static str = "PARAM_EXT_SET";
23289    const EXTRA_CRC: u8 = 78u8;
23290    const ENCODED_LEN: usize = 147usize;
23291    fn deser(
23292        _version: MavlinkVersion,
23293        __input: &[u8],
23294    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23295        let avail_len = __input.len();
23296        let mut payload_buf = [0; Self::ENCODED_LEN];
23297        let mut buf = if avail_len < Self::ENCODED_LEN {
23298            payload_buf[0..avail_len].copy_from_slice(__input);
23299            Bytes::new(&payload_buf)
23300        } else {
23301            Bytes::new(__input)
23302        };
23303        let mut __struct = Self::default();
23304        __struct.target_system = buf.get_u8()?;
23305        __struct.target_component = buf.get_u8()?;
23306        let mut tmp = [0_u8; 16usize];
23307        for v in &mut tmp {
23308            *v = buf.get_u8()?;
23309        }
23310        __struct.param_id = CharArray::new(tmp);
23311        let mut tmp = [0_u8; 128usize];
23312        for v in &mut tmp {
23313            *v = buf.get_u8()?;
23314        }
23315        __struct.param_value = CharArray::new(tmp);
23316        let tmp = buf.get_u8()?;
23317        __struct.param_type =
23318            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23319                enum_type: "MavParamExtType",
23320                value: tmp as u64,
23321            })?;
23322        Ok(__struct)
23323    }
23324    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23325        let mut __tmp = BytesMut::new(bytes);
23326        #[allow(clippy::absurd_extreme_comparisons)]
23327        #[allow(unused_comparisons)]
23328        if __tmp.remaining() < Self::ENCODED_LEN {
23329            panic!(
23330                "buffer is too small (need {} bytes, but got {})",
23331                Self::ENCODED_LEN,
23332                __tmp.remaining(),
23333            )
23334        }
23335        __tmp.put_u8(self.target_system);
23336        __tmp.put_u8(self.target_component);
23337        for val in &self.param_id {
23338            __tmp.put_u8(*val);
23339        }
23340        for val in &self.param_value {
23341            __tmp.put_u8(*val);
23342        }
23343        __tmp.put_u8(self.param_type as u8);
23344        if matches!(version, MavlinkVersion::V2) {
23345            let len = __tmp.len();
23346            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23347        } else {
23348            __tmp.len()
23349        }
23350    }
23351}
23352#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
23353#[doc = ""]
23354#[doc = "ID: 322"]
23355#[derive(Debug, Clone, PartialEq)]
23356#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23357#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23358#[cfg_attr(feature = "ts", derive(TS))]
23359#[cfg_attr(feature = "ts", ts(export))]
23360pub struct PARAM_EXT_VALUE_DATA {
23361    #[doc = "Total number of parameters"]
23362    pub param_count: u16,
23363    #[doc = "Index of this parameter"]
23364    pub param_index: u16,
23365    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23366    #[cfg_attr(feature = "ts", ts(type = "string"))]
23367    pub param_id: CharArray<16>,
23368    #[doc = "Parameter value"]
23369    #[cfg_attr(feature = "ts", ts(type = "string"))]
23370    pub param_value: CharArray<128>,
23371    #[doc = "Parameter type."]
23372    pub param_type: MavParamExtType,
23373}
23374impl PARAM_EXT_VALUE_DATA {
23375    pub const ENCODED_LEN: usize = 149usize;
23376    pub const DEFAULT: Self = Self {
23377        param_count: 0_u16,
23378        param_index: 0_u16,
23379        param_id: CharArray::new([0_u8; 16usize]),
23380        param_value: CharArray::new([0_u8; 128usize]),
23381        param_type: MavParamExtType::DEFAULT,
23382    };
23383    #[cfg(feature = "arbitrary")]
23384    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23385        use arbitrary::{Arbitrary, Unstructured};
23386        let mut buf = [0u8; 1024];
23387        rng.fill_bytes(&mut buf);
23388        let mut unstructured = Unstructured::new(&buf);
23389        Self::arbitrary(&mut unstructured).unwrap_or_default()
23390    }
23391}
23392impl Default for PARAM_EXT_VALUE_DATA {
23393    fn default() -> Self {
23394        Self::DEFAULT.clone()
23395    }
23396}
23397impl MessageData for PARAM_EXT_VALUE_DATA {
23398    type Message = MavMessage;
23399    const ID: u32 = 322u32;
23400    const NAME: &'static str = "PARAM_EXT_VALUE";
23401    const EXTRA_CRC: u8 = 243u8;
23402    const ENCODED_LEN: usize = 149usize;
23403    fn deser(
23404        _version: MavlinkVersion,
23405        __input: &[u8],
23406    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23407        let avail_len = __input.len();
23408        let mut payload_buf = [0; Self::ENCODED_LEN];
23409        let mut buf = if avail_len < Self::ENCODED_LEN {
23410            payload_buf[0..avail_len].copy_from_slice(__input);
23411            Bytes::new(&payload_buf)
23412        } else {
23413            Bytes::new(__input)
23414        };
23415        let mut __struct = Self::default();
23416        __struct.param_count = buf.get_u16_le()?;
23417        __struct.param_index = buf.get_u16_le()?;
23418        let mut tmp = [0_u8; 16usize];
23419        for v in &mut tmp {
23420            *v = buf.get_u8()?;
23421        }
23422        __struct.param_id = CharArray::new(tmp);
23423        let mut tmp = [0_u8; 128usize];
23424        for v in &mut tmp {
23425            *v = buf.get_u8()?;
23426        }
23427        __struct.param_value = CharArray::new(tmp);
23428        let tmp = buf.get_u8()?;
23429        __struct.param_type =
23430            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23431                enum_type: "MavParamExtType",
23432                value: tmp as u64,
23433            })?;
23434        Ok(__struct)
23435    }
23436    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23437        let mut __tmp = BytesMut::new(bytes);
23438        #[allow(clippy::absurd_extreme_comparisons)]
23439        #[allow(unused_comparisons)]
23440        if __tmp.remaining() < Self::ENCODED_LEN {
23441            panic!(
23442                "buffer is too small (need {} bytes, but got {})",
23443                Self::ENCODED_LEN,
23444                __tmp.remaining(),
23445            )
23446        }
23447        __tmp.put_u16_le(self.param_count);
23448        __tmp.put_u16_le(self.param_index);
23449        for val in &self.param_id {
23450            __tmp.put_u8(*val);
23451        }
23452        for val in &self.param_value {
23453            __tmp.put_u8(*val);
23454        }
23455        __tmp.put_u8(self.param_type as u8);
23456        if matches!(version, MavlinkVersion::V2) {
23457            let len = __tmp.len();
23458            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23459        } else {
23460            __tmp.len()
23461        }
23462    }
23463}
23464#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
23465#[doc = ""]
23466#[doc = "ID: 50"]
23467#[derive(Debug, Clone, PartialEq)]
23468#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23469#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23470#[cfg_attr(feature = "ts", derive(TS))]
23471#[cfg_attr(feature = "ts", ts(export))]
23472pub struct PARAM_MAP_RC_DATA {
23473    #[doc = "Initial parameter value"]
23474    pub param_value0: f32,
23475    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
23476    pub scale: f32,
23477    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
23478    pub param_value_min: f32,
23479    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
23480    pub param_value_max: f32,
23481    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
23482    pub param_index: i16,
23483    #[doc = "System ID"]
23484    pub target_system: u8,
23485    #[doc = "Component ID"]
23486    pub target_component: u8,
23487    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23488    #[cfg_attr(feature = "ts", ts(type = "string"))]
23489    pub param_id: CharArray<16>,
23490    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
23491    pub parameter_rc_channel_index: u8,
23492}
23493impl PARAM_MAP_RC_DATA {
23494    pub const ENCODED_LEN: usize = 37usize;
23495    pub const DEFAULT: Self = Self {
23496        param_value0: 0.0_f32,
23497        scale: 0.0_f32,
23498        param_value_min: 0.0_f32,
23499        param_value_max: 0.0_f32,
23500        param_index: 0_i16,
23501        target_system: 0_u8,
23502        target_component: 0_u8,
23503        param_id: CharArray::new([0_u8; 16usize]),
23504        parameter_rc_channel_index: 0_u8,
23505    };
23506    #[cfg(feature = "arbitrary")]
23507    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23508        use arbitrary::{Arbitrary, Unstructured};
23509        let mut buf = [0u8; 1024];
23510        rng.fill_bytes(&mut buf);
23511        let mut unstructured = Unstructured::new(&buf);
23512        Self::arbitrary(&mut unstructured).unwrap_or_default()
23513    }
23514}
23515impl Default for PARAM_MAP_RC_DATA {
23516    fn default() -> Self {
23517        Self::DEFAULT.clone()
23518    }
23519}
23520impl MessageData for PARAM_MAP_RC_DATA {
23521    type Message = MavMessage;
23522    const ID: u32 = 50u32;
23523    const NAME: &'static str = "PARAM_MAP_RC";
23524    const EXTRA_CRC: u8 = 78u8;
23525    const ENCODED_LEN: usize = 37usize;
23526    fn deser(
23527        _version: MavlinkVersion,
23528        __input: &[u8],
23529    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23530        let avail_len = __input.len();
23531        let mut payload_buf = [0; Self::ENCODED_LEN];
23532        let mut buf = if avail_len < Self::ENCODED_LEN {
23533            payload_buf[0..avail_len].copy_from_slice(__input);
23534            Bytes::new(&payload_buf)
23535        } else {
23536            Bytes::new(__input)
23537        };
23538        let mut __struct = Self::default();
23539        __struct.param_value0 = buf.get_f32_le()?;
23540        __struct.scale = buf.get_f32_le()?;
23541        __struct.param_value_min = buf.get_f32_le()?;
23542        __struct.param_value_max = buf.get_f32_le()?;
23543        __struct.param_index = buf.get_i16_le()?;
23544        __struct.target_system = buf.get_u8()?;
23545        __struct.target_component = buf.get_u8()?;
23546        let mut tmp = [0_u8; 16usize];
23547        for v in &mut tmp {
23548            *v = buf.get_u8()?;
23549        }
23550        __struct.param_id = CharArray::new(tmp);
23551        __struct.parameter_rc_channel_index = buf.get_u8()?;
23552        Ok(__struct)
23553    }
23554    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23555        let mut __tmp = BytesMut::new(bytes);
23556        #[allow(clippy::absurd_extreme_comparisons)]
23557        #[allow(unused_comparisons)]
23558        if __tmp.remaining() < Self::ENCODED_LEN {
23559            panic!(
23560                "buffer is too small (need {} bytes, but got {})",
23561                Self::ENCODED_LEN,
23562                __tmp.remaining(),
23563            )
23564        }
23565        __tmp.put_f32_le(self.param_value0);
23566        __tmp.put_f32_le(self.scale);
23567        __tmp.put_f32_le(self.param_value_min);
23568        __tmp.put_f32_le(self.param_value_max);
23569        __tmp.put_i16_le(self.param_index);
23570        __tmp.put_u8(self.target_system);
23571        __tmp.put_u8(self.target_component);
23572        for val in &self.param_id {
23573            __tmp.put_u8(*val);
23574        }
23575        __tmp.put_u8(self.parameter_rc_channel_index);
23576        if matches!(version, MavlinkVersion::V2) {
23577            let len = __tmp.len();
23578            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23579        } else {
23580            __tmp.len()
23581        }
23582    }
23583}
23584#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23585#[doc = ""]
23586#[doc = "ID: 21"]
23587#[derive(Debug, Clone, PartialEq)]
23588#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23589#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23590#[cfg_attr(feature = "ts", derive(TS))]
23591#[cfg_attr(feature = "ts", ts(export))]
23592pub struct PARAM_REQUEST_LIST_DATA {
23593    #[doc = "System ID"]
23594    pub target_system: u8,
23595    #[doc = "Component ID"]
23596    pub target_component: u8,
23597}
23598impl PARAM_REQUEST_LIST_DATA {
23599    pub const ENCODED_LEN: usize = 2usize;
23600    pub const DEFAULT: Self = Self {
23601        target_system: 0_u8,
23602        target_component: 0_u8,
23603    };
23604    #[cfg(feature = "arbitrary")]
23605    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23606        use arbitrary::{Arbitrary, Unstructured};
23607        let mut buf = [0u8; 1024];
23608        rng.fill_bytes(&mut buf);
23609        let mut unstructured = Unstructured::new(&buf);
23610        Self::arbitrary(&mut unstructured).unwrap_or_default()
23611    }
23612}
23613impl Default for PARAM_REQUEST_LIST_DATA {
23614    fn default() -> Self {
23615        Self::DEFAULT.clone()
23616    }
23617}
23618impl MessageData for PARAM_REQUEST_LIST_DATA {
23619    type Message = MavMessage;
23620    const ID: u32 = 21u32;
23621    const NAME: &'static str = "PARAM_REQUEST_LIST";
23622    const EXTRA_CRC: u8 = 159u8;
23623    const ENCODED_LEN: usize = 2usize;
23624    fn deser(
23625        _version: MavlinkVersion,
23626        __input: &[u8],
23627    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23628        let avail_len = __input.len();
23629        let mut payload_buf = [0; Self::ENCODED_LEN];
23630        let mut buf = if avail_len < Self::ENCODED_LEN {
23631            payload_buf[0..avail_len].copy_from_slice(__input);
23632            Bytes::new(&payload_buf)
23633        } else {
23634            Bytes::new(__input)
23635        };
23636        let mut __struct = Self::default();
23637        __struct.target_system = buf.get_u8()?;
23638        __struct.target_component = buf.get_u8()?;
23639        Ok(__struct)
23640    }
23641    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23642        let mut __tmp = BytesMut::new(bytes);
23643        #[allow(clippy::absurd_extreme_comparisons)]
23644        #[allow(unused_comparisons)]
23645        if __tmp.remaining() < Self::ENCODED_LEN {
23646            panic!(
23647                "buffer is too small (need {} bytes, but got {})",
23648                Self::ENCODED_LEN,
23649                __tmp.remaining(),
23650            )
23651        }
23652        __tmp.put_u8(self.target_system);
23653        __tmp.put_u8(self.target_component);
23654        if matches!(version, MavlinkVersion::V2) {
23655            let len = __tmp.len();
23656            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23657        } else {
23658            __tmp.len()
23659        }
23660    }
23661}
23662#[doc = "Request to read the onboard parameter with the param_id string id. Onboard parameters are stored as key[const char*] -&gt;value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
23663#[doc = ""]
23664#[doc = "ID: 20"]
23665#[derive(Debug, Clone, PartialEq)]
23666#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23667#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23668#[cfg_attr(feature = "ts", derive(TS))]
23669#[cfg_attr(feature = "ts", ts(export))]
23670pub struct PARAM_REQUEST_READ_DATA {
23671    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
23672    pub param_index: i16,
23673    #[doc = "System ID"]
23674    pub target_system: u8,
23675    #[doc = "Component ID"]
23676    pub target_component: u8,
23677    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23678    #[cfg_attr(feature = "ts", ts(type = "string"))]
23679    pub param_id: CharArray<16>,
23680}
23681impl PARAM_REQUEST_READ_DATA {
23682    pub const ENCODED_LEN: usize = 20usize;
23683    pub const DEFAULT: Self = Self {
23684        param_index: 0_i16,
23685        target_system: 0_u8,
23686        target_component: 0_u8,
23687        param_id: CharArray::new([0_u8; 16usize]),
23688    };
23689    #[cfg(feature = "arbitrary")]
23690    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23691        use arbitrary::{Arbitrary, Unstructured};
23692        let mut buf = [0u8; 1024];
23693        rng.fill_bytes(&mut buf);
23694        let mut unstructured = Unstructured::new(&buf);
23695        Self::arbitrary(&mut unstructured).unwrap_or_default()
23696    }
23697}
23698impl Default for PARAM_REQUEST_READ_DATA {
23699    fn default() -> Self {
23700        Self::DEFAULT.clone()
23701    }
23702}
23703impl MessageData for PARAM_REQUEST_READ_DATA {
23704    type Message = MavMessage;
23705    const ID: u32 = 20u32;
23706    const NAME: &'static str = "PARAM_REQUEST_READ";
23707    const EXTRA_CRC: u8 = 214u8;
23708    const ENCODED_LEN: usize = 20usize;
23709    fn deser(
23710        _version: MavlinkVersion,
23711        __input: &[u8],
23712    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23713        let avail_len = __input.len();
23714        let mut payload_buf = [0; Self::ENCODED_LEN];
23715        let mut buf = if avail_len < Self::ENCODED_LEN {
23716            payload_buf[0..avail_len].copy_from_slice(__input);
23717            Bytes::new(&payload_buf)
23718        } else {
23719            Bytes::new(__input)
23720        };
23721        let mut __struct = Self::default();
23722        __struct.param_index = buf.get_i16_le()?;
23723        __struct.target_system = buf.get_u8()?;
23724        __struct.target_component = buf.get_u8()?;
23725        let mut tmp = [0_u8; 16usize];
23726        for v in &mut tmp {
23727            *v = buf.get_u8()?;
23728        }
23729        __struct.param_id = CharArray::new(tmp);
23730        Ok(__struct)
23731    }
23732    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23733        let mut __tmp = BytesMut::new(bytes);
23734        #[allow(clippy::absurd_extreme_comparisons)]
23735        #[allow(unused_comparisons)]
23736        if __tmp.remaining() < Self::ENCODED_LEN {
23737            panic!(
23738                "buffer is too small (need {} bytes, but got {})",
23739                Self::ENCODED_LEN,
23740                __tmp.remaining(),
23741            )
23742        }
23743        __tmp.put_i16_le(self.param_index);
23744        __tmp.put_u8(self.target_system);
23745        __tmp.put_u8(self.target_component);
23746        for val in &self.param_id {
23747            __tmp.put_u8(*val);
23748        }
23749        if matches!(version, MavlinkVersion::V2) {
23750            let len = __tmp.len();
23751            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23752        } else {
23753            __tmp.len()
23754        }
23755    }
23756}
23757#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23758#[doc = ""]
23759#[doc = "ID: 23"]
23760#[derive(Debug, Clone, PartialEq)]
23761#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23762#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23763#[cfg_attr(feature = "ts", derive(TS))]
23764#[cfg_attr(feature = "ts", ts(export))]
23765pub struct PARAM_SET_DATA {
23766    #[doc = "Onboard parameter value"]
23767    pub param_value: f32,
23768    #[doc = "System ID"]
23769    pub target_system: u8,
23770    #[doc = "Component ID"]
23771    pub target_component: u8,
23772    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23773    #[cfg_attr(feature = "ts", ts(type = "string"))]
23774    pub param_id: CharArray<16>,
23775    #[doc = "Onboard parameter type."]
23776    pub param_type: MavParamType,
23777}
23778impl PARAM_SET_DATA {
23779    pub const ENCODED_LEN: usize = 23usize;
23780    pub const DEFAULT: Self = Self {
23781        param_value: 0.0_f32,
23782        target_system: 0_u8,
23783        target_component: 0_u8,
23784        param_id: CharArray::new([0_u8; 16usize]),
23785        param_type: MavParamType::DEFAULT,
23786    };
23787    #[cfg(feature = "arbitrary")]
23788    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23789        use arbitrary::{Arbitrary, Unstructured};
23790        let mut buf = [0u8; 1024];
23791        rng.fill_bytes(&mut buf);
23792        let mut unstructured = Unstructured::new(&buf);
23793        Self::arbitrary(&mut unstructured).unwrap_or_default()
23794    }
23795}
23796impl Default for PARAM_SET_DATA {
23797    fn default() -> Self {
23798        Self::DEFAULT.clone()
23799    }
23800}
23801impl MessageData for PARAM_SET_DATA {
23802    type Message = MavMessage;
23803    const ID: u32 = 23u32;
23804    const NAME: &'static str = "PARAM_SET";
23805    const EXTRA_CRC: u8 = 168u8;
23806    const ENCODED_LEN: usize = 23usize;
23807    fn deser(
23808        _version: MavlinkVersion,
23809        __input: &[u8],
23810    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23811        let avail_len = __input.len();
23812        let mut payload_buf = [0; Self::ENCODED_LEN];
23813        let mut buf = if avail_len < Self::ENCODED_LEN {
23814            payload_buf[0..avail_len].copy_from_slice(__input);
23815            Bytes::new(&payload_buf)
23816        } else {
23817            Bytes::new(__input)
23818        };
23819        let mut __struct = Self::default();
23820        __struct.param_value = buf.get_f32_le()?;
23821        __struct.target_system = buf.get_u8()?;
23822        __struct.target_component = buf.get_u8()?;
23823        let mut tmp = [0_u8; 16usize];
23824        for v in &mut tmp {
23825            *v = buf.get_u8()?;
23826        }
23827        __struct.param_id = CharArray::new(tmp);
23828        let tmp = buf.get_u8()?;
23829        __struct.param_type =
23830            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23831                enum_type: "MavParamType",
23832                value: tmp as u64,
23833            })?;
23834        Ok(__struct)
23835    }
23836    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23837        let mut __tmp = BytesMut::new(bytes);
23838        #[allow(clippy::absurd_extreme_comparisons)]
23839        #[allow(unused_comparisons)]
23840        if __tmp.remaining() < Self::ENCODED_LEN {
23841            panic!(
23842                "buffer is too small (need {} bytes, but got {})",
23843                Self::ENCODED_LEN,
23844                __tmp.remaining(),
23845            )
23846        }
23847        __tmp.put_f32_le(self.param_value);
23848        __tmp.put_u8(self.target_system);
23849        __tmp.put_u8(self.target_component);
23850        for val in &self.param_id {
23851            __tmp.put_u8(*val);
23852        }
23853        __tmp.put_u8(self.param_type as u8);
23854        if matches!(version, MavlinkVersion::V2) {
23855            let len = __tmp.len();
23856            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23857        } else {
23858            __tmp.len()
23859        }
23860    }
23861}
23862#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23863#[doc = ""]
23864#[doc = "ID: 22"]
23865#[derive(Debug, Clone, PartialEq)]
23866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23867#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23868#[cfg_attr(feature = "ts", derive(TS))]
23869#[cfg_attr(feature = "ts", ts(export))]
23870pub struct PARAM_VALUE_DATA {
23871    #[doc = "Onboard parameter value"]
23872    pub param_value: f32,
23873    #[doc = "Total number of onboard parameters"]
23874    pub param_count: u16,
23875    #[doc = "Index of this onboard parameter"]
23876    pub param_index: u16,
23877    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23878    #[cfg_attr(feature = "ts", ts(type = "string"))]
23879    pub param_id: CharArray<16>,
23880    #[doc = "Onboard parameter type."]
23881    pub param_type: MavParamType,
23882}
23883impl PARAM_VALUE_DATA {
23884    pub const ENCODED_LEN: usize = 25usize;
23885    pub const DEFAULT: Self = Self {
23886        param_value: 0.0_f32,
23887        param_count: 0_u16,
23888        param_index: 0_u16,
23889        param_id: CharArray::new([0_u8; 16usize]),
23890        param_type: MavParamType::DEFAULT,
23891    };
23892    #[cfg(feature = "arbitrary")]
23893    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23894        use arbitrary::{Arbitrary, Unstructured};
23895        let mut buf = [0u8; 1024];
23896        rng.fill_bytes(&mut buf);
23897        let mut unstructured = Unstructured::new(&buf);
23898        Self::arbitrary(&mut unstructured).unwrap_or_default()
23899    }
23900}
23901impl Default for PARAM_VALUE_DATA {
23902    fn default() -> Self {
23903        Self::DEFAULT.clone()
23904    }
23905}
23906impl MessageData for PARAM_VALUE_DATA {
23907    type Message = MavMessage;
23908    const ID: u32 = 22u32;
23909    const NAME: &'static str = "PARAM_VALUE";
23910    const EXTRA_CRC: u8 = 220u8;
23911    const ENCODED_LEN: usize = 25usize;
23912    fn deser(
23913        _version: MavlinkVersion,
23914        __input: &[u8],
23915    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23916        let avail_len = __input.len();
23917        let mut payload_buf = [0; Self::ENCODED_LEN];
23918        let mut buf = if avail_len < Self::ENCODED_LEN {
23919            payload_buf[0..avail_len].copy_from_slice(__input);
23920            Bytes::new(&payload_buf)
23921        } else {
23922            Bytes::new(__input)
23923        };
23924        let mut __struct = Self::default();
23925        __struct.param_value = buf.get_f32_le()?;
23926        __struct.param_count = buf.get_u16_le()?;
23927        __struct.param_index = buf.get_u16_le()?;
23928        let mut tmp = [0_u8; 16usize];
23929        for v in &mut tmp {
23930            *v = buf.get_u8()?;
23931        }
23932        __struct.param_id = CharArray::new(tmp);
23933        let tmp = buf.get_u8()?;
23934        __struct.param_type =
23935            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23936                enum_type: "MavParamType",
23937                value: tmp as u64,
23938            })?;
23939        Ok(__struct)
23940    }
23941    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23942        let mut __tmp = BytesMut::new(bytes);
23943        #[allow(clippy::absurd_extreme_comparisons)]
23944        #[allow(unused_comparisons)]
23945        if __tmp.remaining() < Self::ENCODED_LEN {
23946            panic!(
23947                "buffer is too small (need {} bytes, but got {})",
23948                Self::ENCODED_LEN,
23949                __tmp.remaining(),
23950            )
23951        }
23952        __tmp.put_f32_le(self.param_value);
23953        __tmp.put_u16_le(self.param_count);
23954        __tmp.put_u16_le(self.param_index);
23955        for val in &self.param_id {
23956            __tmp.put_u8(*val);
23957        }
23958        __tmp.put_u8(self.param_type as u8);
23959        if matches!(version, MavlinkVersion::V2) {
23960            let len = __tmp.len();
23961            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23962        } else {
23963            __tmp.len()
23964        }
23965    }
23966}
23967#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
23968#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
23969#[doc = ""]
23970#[doc = "ID: 4"]
23971#[derive(Debug, Clone, PartialEq)]
23972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23974#[cfg_attr(feature = "ts", derive(TS))]
23975#[cfg_attr(feature = "ts", ts(export))]
23976pub struct PING_DATA {
23977    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23978    pub time_usec: u64,
23979    #[doc = "PING sequence"]
23980    pub seq: u32,
23981    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
23982    pub target_system: u8,
23983    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
23984    pub target_component: u8,
23985}
23986impl PING_DATA {
23987    pub const ENCODED_LEN: usize = 14usize;
23988    pub const DEFAULT: Self = Self {
23989        time_usec: 0_u64,
23990        seq: 0_u32,
23991        target_system: 0_u8,
23992        target_component: 0_u8,
23993    };
23994    #[cfg(feature = "arbitrary")]
23995    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23996        use arbitrary::{Arbitrary, Unstructured};
23997        let mut buf = [0u8; 1024];
23998        rng.fill_bytes(&mut buf);
23999        let mut unstructured = Unstructured::new(&buf);
24000        Self::arbitrary(&mut unstructured).unwrap_or_default()
24001    }
24002}
24003impl Default for PING_DATA {
24004    fn default() -> Self {
24005        Self::DEFAULT.clone()
24006    }
24007}
24008impl MessageData for PING_DATA {
24009    type Message = MavMessage;
24010    const ID: u32 = 4u32;
24011    const NAME: &'static str = "PING";
24012    const EXTRA_CRC: u8 = 237u8;
24013    const ENCODED_LEN: usize = 14usize;
24014    fn deser(
24015        _version: MavlinkVersion,
24016        __input: &[u8],
24017    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24018        let avail_len = __input.len();
24019        let mut payload_buf = [0; Self::ENCODED_LEN];
24020        let mut buf = if avail_len < Self::ENCODED_LEN {
24021            payload_buf[0..avail_len].copy_from_slice(__input);
24022            Bytes::new(&payload_buf)
24023        } else {
24024            Bytes::new(__input)
24025        };
24026        let mut __struct = Self::default();
24027        __struct.time_usec = buf.get_u64_le()?;
24028        __struct.seq = buf.get_u32_le()?;
24029        __struct.target_system = buf.get_u8()?;
24030        __struct.target_component = buf.get_u8()?;
24031        Ok(__struct)
24032    }
24033    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24034        let mut __tmp = BytesMut::new(bytes);
24035        #[allow(clippy::absurd_extreme_comparisons)]
24036        #[allow(unused_comparisons)]
24037        if __tmp.remaining() < Self::ENCODED_LEN {
24038            panic!(
24039                "buffer is too small (need {} bytes, but got {})",
24040                Self::ENCODED_LEN,
24041                __tmp.remaining(),
24042            )
24043        }
24044        __tmp.put_u64_le(self.time_usec);
24045        __tmp.put_u32_le(self.seq);
24046        __tmp.put_u8(self.target_system);
24047        __tmp.put_u8(self.target_component);
24048        if matches!(version, MavlinkVersion::V2) {
24049            let len = __tmp.len();
24050            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24051        } else {
24052            __tmp.len()
24053        }
24054    }
24055}
24056#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24057#[doc = "Control vehicle tone generation (buzzer)."]
24058#[doc = ""]
24059#[doc = "ID: 258"]
24060#[derive(Debug, Clone, PartialEq)]
24061#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24062#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24063#[cfg_attr(feature = "ts", derive(TS))]
24064#[cfg_attr(feature = "ts", ts(export))]
24065pub struct PLAY_TUNE_DATA {
24066    #[doc = "System ID"]
24067    pub target_system: u8,
24068    #[doc = "Component ID"]
24069    pub target_component: u8,
24070    #[doc = "tune in board specific format"]
24071    #[cfg_attr(feature = "ts", ts(type = "string"))]
24072    pub tune: CharArray<30>,
24073    #[doc = "tune extension (appended to tune)"]
24074    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24075    #[cfg_attr(feature = "ts", ts(type = "string"))]
24076    pub tune2: CharArray<200>,
24077}
24078impl PLAY_TUNE_DATA {
24079    pub const ENCODED_LEN: usize = 232usize;
24080    pub const DEFAULT: Self = Self {
24081        target_system: 0_u8,
24082        target_component: 0_u8,
24083        tune: CharArray::new([0_u8; 30usize]),
24084        tune2: CharArray::new([0_u8; 200usize]),
24085    };
24086    #[cfg(feature = "arbitrary")]
24087    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24088        use arbitrary::{Arbitrary, Unstructured};
24089        let mut buf = [0u8; 1024];
24090        rng.fill_bytes(&mut buf);
24091        let mut unstructured = Unstructured::new(&buf);
24092        Self::arbitrary(&mut unstructured).unwrap_or_default()
24093    }
24094}
24095impl Default for PLAY_TUNE_DATA {
24096    fn default() -> Self {
24097        Self::DEFAULT.clone()
24098    }
24099}
24100impl MessageData for PLAY_TUNE_DATA {
24101    type Message = MavMessage;
24102    const ID: u32 = 258u32;
24103    const NAME: &'static str = "PLAY_TUNE";
24104    const EXTRA_CRC: u8 = 187u8;
24105    const ENCODED_LEN: usize = 232usize;
24106    fn deser(
24107        _version: MavlinkVersion,
24108        __input: &[u8],
24109    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24110        let avail_len = __input.len();
24111        let mut payload_buf = [0; Self::ENCODED_LEN];
24112        let mut buf = if avail_len < Self::ENCODED_LEN {
24113            payload_buf[0..avail_len].copy_from_slice(__input);
24114            Bytes::new(&payload_buf)
24115        } else {
24116            Bytes::new(__input)
24117        };
24118        let mut __struct = Self::default();
24119        __struct.target_system = buf.get_u8()?;
24120        __struct.target_component = buf.get_u8()?;
24121        let mut tmp = [0_u8; 30usize];
24122        for v in &mut tmp {
24123            *v = buf.get_u8()?;
24124        }
24125        __struct.tune = CharArray::new(tmp);
24126        let mut tmp = [0_u8; 200usize];
24127        for v in &mut tmp {
24128            *v = buf.get_u8()?;
24129        }
24130        __struct.tune2 = CharArray::new(tmp);
24131        Ok(__struct)
24132    }
24133    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24134        let mut __tmp = BytesMut::new(bytes);
24135        #[allow(clippy::absurd_extreme_comparisons)]
24136        #[allow(unused_comparisons)]
24137        if __tmp.remaining() < Self::ENCODED_LEN {
24138            panic!(
24139                "buffer is too small (need {} bytes, but got {})",
24140                Self::ENCODED_LEN,
24141                __tmp.remaining(),
24142            )
24143        }
24144        __tmp.put_u8(self.target_system);
24145        __tmp.put_u8(self.target_component);
24146        for val in &self.tune {
24147            __tmp.put_u8(*val);
24148        }
24149        if matches!(version, MavlinkVersion::V2) {
24150            for val in &self.tune2 {
24151                __tmp.put_u8(*val);
24152            }
24153            let len = __tmp.len();
24154            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24155        } else {
24156            __tmp.len()
24157        }
24158    }
24159}
24160#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
24161#[doc = ""]
24162#[doc = "ID: 400"]
24163#[derive(Debug, Clone, PartialEq)]
24164#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24165#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24166#[cfg_attr(feature = "ts", derive(TS))]
24167#[cfg_attr(feature = "ts", ts(export))]
24168pub struct PLAY_TUNE_V2_DATA {
24169    #[doc = "Tune format"]
24170    pub format: TuneFormat,
24171    #[doc = "System ID"]
24172    pub target_system: u8,
24173    #[doc = "Component ID"]
24174    pub target_component: u8,
24175    #[doc = "Tune definition as a NULL-terminated string."]
24176    #[cfg_attr(feature = "ts", ts(type = "string"))]
24177    pub tune: CharArray<248>,
24178}
24179impl PLAY_TUNE_V2_DATA {
24180    pub const ENCODED_LEN: usize = 254usize;
24181    pub const DEFAULT: Self = Self {
24182        format: TuneFormat::DEFAULT,
24183        target_system: 0_u8,
24184        target_component: 0_u8,
24185        tune: CharArray::new([0_u8; 248usize]),
24186    };
24187    #[cfg(feature = "arbitrary")]
24188    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24189        use arbitrary::{Arbitrary, Unstructured};
24190        let mut buf = [0u8; 1024];
24191        rng.fill_bytes(&mut buf);
24192        let mut unstructured = Unstructured::new(&buf);
24193        Self::arbitrary(&mut unstructured).unwrap_or_default()
24194    }
24195}
24196impl Default for PLAY_TUNE_V2_DATA {
24197    fn default() -> Self {
24198        Self::DEFAULT.clone()
24199    }
24200}
24201impl MessageData for PLAY_TUNE_V2_DATA {
24202    type Message = MavMessage;
24203    const ID: u32 = 400u32;
24204    const NAME: &'static str = "PLAY_TUNE_V2";
24205    const EXTRA_CRC: u8 = 110u8;
24206    const ENCODED_LEN: usize = 254usize;
24207    fn deser(
24208        _version: MavlinkVersion,
24209        __input: &[u8],
24210    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24211        let avail_len = __input.len();
24212        let mut payload_buf = [0; Self::ENCODED_LEN];
24213        let mut buf = if avail_len < Self::ENCODED_LEN {
24214            payload_buf[0..avail_len].copy_from_slice(__input);
24215            Bytes::new(&payload_buf)
24216        } else {
24217            Bytes::new(__input)
24218        };
24219        let mut __struct = Self::default();
24220        let tmp = buf.get_u32_le()?;
24221        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
24222            ::mavlink_core::error::ParserError::InvalidEnum {
24223                enum_type: "TuneFormat",
24224                value: tmp as u64,
24225            },
24226        )?;
24227        __struct.target_system = buf.get_u8()?;
24228        __struct.target_component = buf.get_u8()?;
24229        let mut tmp = [0_u8; 248usize];
24230        for v in &mut tmp {
24231            *v = buf.get_u8()?;
24232        }
24233        __struct.tune = CharArray::new(tmp);
24234        Ok(__struct)
24235    }
24236    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24237        let mut __tmp = BytesMut::new(bytes);
24238        #[allow(clippy::absurd_extreme_comparisons)]
24239        #[allow(unused_comparisons)]
24240        if __tmp.remaining() < Self::ENCODED_LEN {
24241            panic!(
24242                "buffer is too small (need {} bytes, but got {})",
24243                Self::ENCODED_LEN,
24244                __tmp.remaining(),
24245            )
24246        }
24247        __tmp.put_u32_le(self.format as u32);
24248        __tmp.put_u8(self.target_system);
24249        __tmp.put_u8(self.target_component);
24250        for val in &self.tune {
24251            __tmp.put_u8(*val);
24252        }
24253        if matches!(version, MavlinkVersion::V2) {
24254            let len = __tmp.len();
24255            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24256        } else {
24257            __tmp.len()
24258        }
24259    }
24260}
24261#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
24262#[doc = ""]
24263#[doc = "ID: 87"]
24264#[derive(Debug, Clone, PartialEq)]
24265#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24266#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24267#[cfg_attr(feature = "ts", derive(TS))]
24268#[cfg_attr(feature = "ts", ts(export))]
24269pub struct POSITION_TARGET_GLOBAL_INT_DATA {
24270    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
24271    pub time_boot_ms: u32,
24272    #[doc = "Latitude in WGS84 frame"]
24273    pub lat_int: i32,
24274    #[doc = "Longitude in WGS84 frame"]
24275    pub lon_int: i32,
24276    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
24277    pub alt: f32,
24278    #[doc = "X velocity in NED frame"]
24279    pub vx: f32,
24280    #[doc = "Y velocity in NED frame"]
24281    pub vy: f32,
24282    #[doc = "Z velocity in NED frame"]
24283    pub vz: f32,
24284    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24285    pub afx: f32,
24286    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24287    pub afy: f32,
24288    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24289    pub afz: f32,
24290    #[doc = "yaw setpoint"]
24291    pub yaw: f32,
24292    #[doc = "yaw rate setpoint"]
24293    pub yaw_rate: f32,
24294    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24295    pub type_mask: PositionTargetTypemask,
24296    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
24297    pub coordinate_frame: MavFrame,
24298}
24299impl POSITION_TARGET_GLOBAL_INT_DATA {
24300    pub const ENCODED_LEN: usize = 51usize;
24301    pub const DEFAULT: Self = Self {
24302        time_boot_ms: 0_u32,
24303        lat_int: 0_i32,
24304        lon_int: 0_i32,
24305        alt: 0.0_f32,
24306        vx: 0.0_f32,
24307        vy: 0.0_f32,
24308        vz: 0.0_f32,
24309        afx: 0.0_f32,
24310        afy: 0.0_f32,
24311        afz: 0.0_f32,
24312        yaw: 0.0_f32,
24313        yaw_rate: 0.0_f32,
24314        type_mask: PositionTargetTypemask::DEFAULT,
24315        coordinate_frame: MavFrame::DEFAULT,
24316    };
24317    #[cfg(feature = "arbitrary")]
24318    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24319        use arbitrary::{Arbitrary, Unstructured};
24320        let mut buf = [0u8; 1024];
24321        rng.fill_bytes(&mut buf);
24322        let mut unstructured = Unstructured::new(&buf);
24323        Self::arbitrary(&mut unstructured).unwrap_or_default()
24324    }
24325}
24326impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
24327    fn default() -> Self {
24328        Self::DEFAULT.clone()
24329    }
24330}
24331impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
24332    type Message = MavMessage;
24333    const ID: u32 = 87u32;
24334    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
24335    const EXTRA_CRC: u8 = 150u8;
24336    const ENCODED_LEN: usize = 51usize;
24337    fn deser(
24338        _version: MavlinkVersion,
24339        __input: &[u8],
24340    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24341        let avail_len = __input.len();
24342        let mut payload_buf = [0; Self::ENCODED_LEN];
24343        let mut buf = if avail_len < Self::ENCODED_LEN {
24344            payload_buf[0..avail_len].copy_from_slice(__input);
24345            Bytes::new(&payload_buf)
24346        } else {
24347            Bytes::new(__input)
24348        };
24349        let mut __struct = Self::default();
24350        __struct.time_boot_ms = buf.get_u32_le()?;
24351        __struct.lat_int = buf.get_i32_le()?;
24352        __struct.lon_int = buf.get_i32_le()?;
24353        __struct.alt = buf.get_f32_le()?;
24354        __struct.vx = buf.get_f32_le()?;
24355        __struct.vy = buf.get_f32_le()?;
24356        __struct.vz = buf.get_f32_le()?;
24357        __struct.afx = buf.get_f32_le()?;
24358        __struct.afy = buf.get_f32_le()?;
24359        __struct.afz = buf.get_f32_le()?;
24360        __struct.yaw = buf.get_f32_le()?;
24361        __struct.yaw_rate = buf.get_f32_le()?;
24362        let tmp = buf.get_u16_le()?;
24363        __struct.type_mask =
24364            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
24365                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24366                    flag_type: "PositionTargetTypemask",
24367                    value: tmp as u64,
24368                })?;
24369        let tmp = buf.get_u8()?;
24370        __struct.coordinate_frame =
24371            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24372                enum_type: "MavFrame",
24373                value: tmp as u64,
24374            })?;
24375        Ok(__struct)
24376    }
24377    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24378        let mut __tmp = BytesMut::new(bytes);
24379        #[allow(clippy::absurd_extreme_comparisons)]
24380        #[allow(unused_comparisons)]
24381        if __tmp.remaining() < Self::ENCODED_LEN {
24382            panic!(
24383                "buffer is too small (need {} bytes, but got {})",
24384                Self::ENCODED_LEN,
24385                __tmp.remaining(),
24386            )
24387        }
24388        __tmp.put_u32_le(self.time_boot_ms);
24389        __tmp.put_i32_le(self.lat_int);
24390        __tmp.put_i32_le(self.lon_int);
24391        __tmp.put_f32_le(self.alt);
24392        __tmp.put_f32_le(self.vx);
24393        __tmp.put_f32_le(self.vy);
24394        __tmp.put_f32_le(self.vz);
24395        __tmp.put_f32_le(self.afx);
24396        __tmp.put_f32_le(self.afy);
24397        __tmp.put_f32_le(self.afz);
24398        __tmp.put_f32_le(self.yaw);
24399        __tmp.put_f32_le(self.yaw_rate);
24400        __tmp.put_u16_le(self.type_mask.bits() as u16);
24401        __tmp.put_u8(self.coordinate_frame as u8);
24402        if matches!(version, MavlinkVersion::V2) {
24403            let len = __tmp.len();
24404            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24405        } else {
24406            __tmp.len()
24407        }
24408    }
24409}
24410#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
24411#[doc = ""]
24412#[doc = "ID: 85"]
24413#[derive(Debug, Clone, PartialEq)]
24414#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24415#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24416#[cfg_attr(feature = "ts", derive(TS))]
24417#[cfg_attr(feature = "ts", ts(export))]
24418pub struct POSITION_TARGET_LOCAL_NED_DATA {
24419    #[doc = "Timestamp (time since system boot)."]
24420    pub time_boot_ms: u32,
24421    #[doc = "X Position in NED frame"]
24422    pub x: f32,
24423    #[doc = "Y Position in NED frame"]
24424    pub y: f32,
24425    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
24426    pub z: f32,
24427    #[doc = "X velocity in NED frame"]
24428    pub vx: f32,
24429    #[doc = "Y velocity in NED frame"]
24430    pub vy: f32,
24431    #[doc = "Z velocity in NED frame"]
24432    pub vz: f32,
24433    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24434    pub afx: f32,
24435    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24436    pub afy: f32,
24437    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24438    pub afz: f32,
24439    #[doc = "yaw setpoint"]
24440    pub yaw: f32,
24441    #[doc = "yaw rate setpoint"]
24442    pub yaw_rate: f32,
24443    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24444    pub type_mask: PositionTargetTypemask,
24445    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
24446    pub coordinate_frame: MavFrame,
24447}
24448impl POSITION_TARGET_LOCAL_NED_DATA {
24449    pub const ENCODED_LEN: usize = 51usize;
24450    pub const DEFAULT: Self = Self {
24451        time_boot_ms: 0_u32,
24452        x: 0.0_f32,
24453        y: 0.0_f32,
24454        z: 0.0_f32,
24455        vx: 0.0_f32,
24456        vy: 0.0_f32,
24457        vz: 0.0_f32,
24458        afx: 0.0_f32,
24459        afy: 0.0_f32,
24460        afz: 0.0_f32,
24461        yaw: 0.0_f32,
24462        yaw_rate: 0.0_f32,
24463        type_mask: PositionTargetTypemask::DEFAULT,
24464        coordinate_frame: MavFrame::DEFAULT,
24465    };
24466    #[cfg(feature = "arbitrary")]
24467    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24468        use arbitrary::{Arbitrary, Unstructured};
24469        let mut buf = [0u8; 1024];
24470        rng.fill_bytes(&mut buf);
24471        let mut unstructured = Unstructured::new(&buf);
24472        Self::arbitrary(&mut unstructured).unwrap_or_default()
24473    }
24474}
24475impl Default for POSITION_TARGET_LOCAL_NED_DATA {
24476    fn default() -> Self {
24477        Self::DEFAULT.clone()
24478    }
24479}
24480impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
24481    type Message = MavMessage;
24482    const ID: u32 = 85u32;
24483    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
24484    const EXTRA_CRC: u8 = 140u8;
24485    const ENCODED_LEN: usize = 51usize;
24486    fn deser(
24487        _version: MavlinkVersion,
24488        __input: &[u8],
24489    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24490        let avail_len = __input.len();
24491        let mut payload_buf = [0; Self::ENCODED_LEN];
24492        let mut buf = if avail_len < Self::ENCODED_LEN {
24493            payload_buf[0..avail_len].copy_from_slice(__input);
24494            Bytes::new(&payload_buf)
24495        } else {
24496            Bytes::new(__input)
24497        };
24498        let mut __struct = Self::default();
24499        __struct.time_boot_ms = buf.get_u32_le()?;
24500        __struct.x = buf.get_f32_le()?;
24501        __struct.y = buf.get_f32_le()?;
24502        __struct.z = buf.get_f32_le()?;
24503        __struct.vx = buf.get_f32_le()?;
24504        __struct.vy = buf.get_f32_le()?;
24505        __struct.vz = buf.get_f32_le()?;
24506        __struct.afx = buf.get_f32_le()?;
24507        __struct.afy = buf.get_f32_le()?;
24508        __struct.afz = buf.get_f32_le()?;
24509        __struct.yaw = buf.get_f32_le()?;
24510        __struct.yaw_rate = buf.get_f32_le()?;
24511        let tmp = buf.get_u16_le()?;
24512        __struct.type_mask =
24513            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
24514                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24515                    flag_type: "PositionTargetTypemask",
24516                    value: tmp as u64,
24517                })?;
24518        let tmp = buf.get_u8()?;
24519        __struct.coordinate_frame =
24520            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24521                enum_type: "MavFrame",
24522                value: tmp as u64,
24523            })?;
24524        Ok(__struct)
24525    }
24526    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24527        let mut __tmp = BytesMut::new(bytes);
24528        #[allow(clippy::absurd_extreme_comparisons)]
24529        #[allow(unused_comparisons)]
24530        if __tmp.remaining() < Self::ENCODED_LEN {
24531            panic!(
24532                "buffer is too small (need {} bytes, but got {})",
24533                Self::ENCODED_LEN,
24534                __tmp.remaining(),
24535            )
24536        }
24537        __tmp.put_u32_le(self.time_boot_ms);
24538        __tmp.put_f32_le(self.x);
24539        __tmp.put_f32_le(self.y);
24540        __tmp.put_f32_le(self.z);
24541        __tmp.put_f32_le(self.vx);
24542        __tmp.put_f32_le(self.vy);
24543        __tmp.put_f32_le(self.vz);
24544        __tmp.put_f32_le(self.afx);
24545        __tmp.put_f32_le(self.afy);
24546        __tmp.put_f32_le(self.afz);
24547        __tmp.put_f32_le(self.yaw);
24548        __tmp.put_f32_le(self.yaw_rate);
24549        __tmp.put_u16_le(self.type_mask.bits() as u16);
24550        __tmp.put_u8(self.coordinate_frame as u8);
24551        if matches!(version, MavlinkVersion::V2) {
24552            let len = __tmp.len();
24553            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24554        } else {
24555            __tmp.len()
24556        }
24557    }
24558}
24559#[doc = "Power supply status."]
24560#[doc = ""]
24561#[doc = "ID: 125"]
24562#[derive(Debug, Clone, PartialEq)]
24563#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24564#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24565#[cfg_attr(feature = "ts", derive(TS))]
24566#[cfg_attr(feature = "ts", ts(export))]
24567pub struct POWER_STATUS_DATA {
24568    #[doc = "5V rail voltage."]
24569    pub Vcc: u16,
24570    #[doc = "Servo rail voltage."]
24571    pub Vservo: u16,
24572    #[doc = "Bitmap of power supply status flags."]
24573    pub flags: MavPowerStatus,
24574}
24575impl POWER_STATUS_DATA {
24576    pub const ENCODED_LEN: usize = 6usize;
24577    pub const DEFAULT: Self = Self {
24578        Vcc: 0_u16,
24579        Vservo: 0_u16,
24580        flags: MavPowerStatus::DEFAULT,
24581    };
24582    #[cfg(feature = "arbitrary")]
24583    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24584        use arbitrary::{Arbitrary, Unstructured};
24585        let mut buf = [0u8; 1024];
24586        rng.fill_bytes(&mut buf);
24587        let mut unstructured = Unstructured::new(&buf);
24588        Self::arbitrary(&mut unstructured).unwrap_or_default()
24589    }
24590}
24591impl Default for POWER_STATUS_DATA {
24592    fn default() -> Self {
24593        Self::DEFAULT.clone()
24594    }
24595}
24596impl MessageData for POWER_STATUS_DATA {
24597    type Message = MavMessage;
24598    const ID: u32 = 125u32;
24599    const NAME: &'static str = "POWER_STATUS";
24600    const EXTRA_CRC: u8 = 203u8;
24601    const ENCODED_LEN: usize = 6usize;
24602    fn deser(
24603        _version: MavlinkVersion,
24604        __input: &[u8],
24605    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24606        let avail_len = __input.len();
24607        let mut payload_buf = [0; Self::ENCODED_LEN];
24608        let mut buf = if avail_len < Self::ENCODED_LEN {
24609            payload_buf[0..avail_len].copy_from_slice(__input);
24610            Bytes::new(&payload_buf)
24611        } else {
24612            Bytes::new(__input)
24613        };
24614        let mut __struct = Self::default();
24615        __struct.Vcc = buf.get_u16_le()?;
24616        __struct.Vservo = buf.get_u16_le()?;
24617        let tmp = buf.get_u16_le()?;
24618        __struct.flags = MavPowerStatus::from_bits(tmp as <MavPowerStatus as Flags>::Bits).ok_or(
24619            ::mavlink_core::error::ParserError::InvalidFlag {
24620                flag_type: "MavPowerStatus",
24621                value: tmp as u64,
24622            },
24623        )?;
24624        Ok(__struct)
24625    }
24626    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24627        let mut __tmp = BytesMut::new(bytes);
24628        #[allow(clippy::absurd_extreme_comparisons)]
24629        #[allow(unused_comparisons)]
24630        if __tmp.remaining() < Self::ENCODED_LEN {
24631            panic!(
24632                "buffer is too small (need {} bytes, but got {})",
24633                Self::ENCODED_LEN,
24634                __tmp.remaining(),
24635            )
24636        }
24637        __tmp.put_u16_le(self.Vcc);
24638        __tmp.put_u16_le(self.Vservo);
24639        __tmp.put_u16_le(self.flags.bits() as u16);
24640        if matches!(version, MavlinkVersion::V2) {
24641            let len = __tmp.len();
24642            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24643        } else {
24644            __tmp.len()
24645        }
24646    }
24647}
24648#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
24649#[doc = ""]
24650#[doc = "ID: 300"]
24651#[derive(Debug, Clone, PartialEq)]
24652#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24653#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24654#[cfg_attr(feature = "ts", derive(TS))]
24655#[cfg_attr(feature = "ts", ts(export))]
24656pub struct PROTOCOL_VERSION_DATA {
24657    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
24658    pub version: u16,
24659    #[doc = "Minimum MAVLink version supported"]
24660    pub min_version: u16,
24661    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
24662    pub max_version: u16,
24663    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24664    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24665    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24666    pub spec_version_hash: [u8; 8],
24667    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24668    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24669    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24670    pub library_version_hash: [u8; 8],
24671}
24672impl PROTOCOL_VERSION_DATA {
24673    pub const ENCODED_LEN: usize = 22usize;
24674    pub const DEFAULT: Self = Self {
24675        version: 0_u16,
24676        min_version: 0_u16,
24677        max_version: 0_u16,
24678        spec_version_hash: [0_u8; 8usize],
24679        library_version_hash: [0_u8; 8usize],
24680    };
24681    #[cfg(feature = "arbitrary")]
24682    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24683        use arbitrary::{Arbitrary, Unstructured};
24684        let mut buf = [0u8; 1024];
24685        rng.fill_bytes(&mut buf);
24686        let mut unstructured = Unstructured::new(&buf);
24687        Self::arbitrary(&mut unstructured).unwrap_or_default()
24688    }
24689}
24690impl Default for PROTOCOL_VERSION_DATA {
24691    fn default() -> Self {
24692        Self::DEFAULT.clone()
24693    }
24694}
24695impl MessageData for PROTOCOL_VERSION_DATA {
24696    type Message = MavMessage;
24697    const ID: u32 = 300u32;
24698    const NAME: &'static str = "PROTOCOL_VERSION";
24699    const EXTRA_CRC: u8 = 217u8;
24700    const ENCODED_LEN: usize = 22usize;
24701    fn deser(
24702        _version: MavlinkVersion,
24703        __input: &[u8],
24704    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24705        let avail_len = __input.len();
24706        let mut payload_buf = [0; Self::ENCODED_LEN];
24707        let mut buf = if avail_len < Self::ENCODED_LEN {
24708            payload_buf[0..avail_len].copy_from_slice(__input);
24709            Bytes::new(&payload_buf)
24710        } else {
24711            Bytes::new(__input)
24712        };
24713        let mut __struct = Self::default();
24714        __struct.version = buf.get_u16_le()?;
24715        __struct.min_version = buf.get_u16_le()?;
24716        __struct.max_version = buf.get_u16_le()?;
24717        for v in &mut __struct.spec_version_hash {
24718            let val = buf.get_u8()?;
24719            *v = val;
24720        }
24721        for v in &mut __struct.library_version_hash {
24722            let val = buf.get_u8()?;
24723            *v = val;
24724        }
24725        Ok(__struct)
24726    }
24727    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24728        let mut __tmp = BytesMut::new(bytes);
24729        #[allow(clippy::absurd_extreme_comparisons)]
24730        #[allow(unused_comparisons)]
24731        if __tmp.remaining() < Self::ENCODED_LEN {
24732            panic!(
24733                "buffer is too small (need {} bytes, but got {})",
24734                Self::ENCODED_LEN,
24735                __tmp.remaining(),
24736            )
24737        }
24738        __tmp.put_u16_le(self.version);
24739        __tmp.put_u16_le(self.min_version);
24740        __tmp.put_u16_le(self.max_version);
24741        for val in &self.spec_version_hash {
24742            __tmp.put_u8(*val);
24743        }
24744        for val in &self.library_version_hash {
24745            __tmp.put_u8(*val);
24746        }
24747        if matches!(version, MavlinkVersion::V2) {
24748            let len = __tmp.len();
24749            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24750        } else {
24751            __tmp.len()
24752        }
24753    }
24754}
24755#[doc = "Status generated by radio and injected into MAVLink stream."]
24756#[doc = ""]
24757#[doc = "ID: 109"]
24758#[derive(Debug, Clone, PartialEq)]
24759#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24761#[cfg_attr(feature = "ts", derive(TS))]
24762#[cfg_attr(feature = "ts", ts(export))]
24763pub struct RADIO_STATUS_DATA {
24764    #[doc = "Count of radio packet receive errors (since boot)."]
24765    pub rxerrors: u16,
24766    #[doc = "Count of error corrected radio packets (since boot)."]
24767    pub fixed: u16,
24768    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24769    pub rssi: u8,
24770    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24771    pub remrssi: u8,
24772    #[doc = "Remaining free transmitter buffer space."]
24773    pub txbuf: u8,
24774    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24775    pub noise: u8,
24776    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24777    pub remnoise: u8,
24778}
24779impl RADIO_STATUS_DATA {
24780    pub const ENCODED_LEN: usize = 9usize;
24781    pub const DEFAULT: Self = Self {
24782        rxerrors: 0_u16,
24783        fixed: 0_u16,
24784        rssi: 0_u8,
24785        remrssi: 0_u8,
24786        txbuf: 0_u8,
24787        noise: 0_u8,
24788        remnoise: 0_u8,
24789    };
24790    #[cfg(feature = "arbitrary")]
24791    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24792        use arbitrary::{Arbitrary, Unstructured};
24793        let mut buf = [0u8; 1024];
24794        rng.fill_bytes(&mut buf);
24795        let mut unstructured = Unstructured::new(&buf);
24796        Self::arbitrary(&mut unstructured).unwrap_or_default()
24797    }
24798}
24799impl Default for RADIO_STATUS_DATA {
24800    fn default() -> Self {
24801        Self::DEFAULT.clone()
24802    }
24803}
24804impl MessageData for RADIO_STATUS_DATA {
24805    type Message = MavMessage;
24806    const ID: u32 = 109u32;
24807    const NAME: &'static str = "RADIO_STATUS";
24808    const EXTRA_CRC: u8 = 185u8;
24809    const ENCODED_LEN: usize = 9usize;
24810    fn deser(
24811        _version: MavlinkVersion,
24812        __input: &[u8],
24813    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24814        let avail_len = __input.len();
24815        let mut payload_buf = [0; Self::ENCODED_LEN];
24816        let mut buf = if avail_len < Self::ENCODED_LEN {
24817            payload_buf[0..avail_len].copy_from_slice(__input);
24818            Bytes::new(&payload_buf)
24819        } else {
24820            Bytes::new(__input)
24821        };
24822        let mut __struct = Self::default();
24823        __struct.rxerrors = buf.get_u16_le()?;
24824        __struct.fixed = buf.get_u16_le()?;
24825        __struct.rssi = buf.get_u8()?;
24826        __struct.remrssi = buf.get_u8()?;
24827        __struct.txbuf = buf.get_u8()?;
24828        __struct.noise = buf.get_u8()?;
24829        __struct.remnoise = buf.get_u8()?;
24830        Ok(__struct)
24831    }
24832    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24833        let mut __tmp = BytesMut::new(bytes);
24834        #[allow(clippy::absurd_extreme_comparisons)]
24835        #[allow(unused_comparisons)]
24836        if __tmp.remaining() < Self::ENCODED_LEN {
24837            panic!(
24838                "buffer is too small (need {} bytes, but got {})",
24839                Self::ENCODED_LEN,
24840                __tmp.remaining(),
24841            )
24842        }
24843        __tmp.put_u16_le(self.rxerrors);
24844        __tmp.put_u16_le(self.fixed);
24845        __tmp.put_u8(self.rssi);
24846        __tmp.put_u8(self.remrssi);
24847        __tmp.put_u8(self.txbuf);
24848        __tmp.put_u8(self.noise);
24849        __tmp.put_u8(self.remnoise);
24850        if matches!(version, MavlinkVersion::V2) {
24851            let len = __tmp.len();
24852            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24853        } else {
24854            __tmp.len()
24855        }
24856    }
24857}
24858#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
24859#[doc = ""]
24860#[doc = "ID: 27"]
24861#[derive(Debug, Clone, PartialEq)]
24862#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24863#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24864#[cfg_attr(feature = "ts", derive(TS))]
24865#[cfg_attr(feature = "ts", ts(export))]
24866pub struct RAW_IMU_DATA {
24867    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24868    pub time_usec: u64,
24869    #[doc = "X acceleration (raw)"]
24870    pub xacc: i16,
24871    #[doc = "Y acceleration (raw)"]
24872    pub yacc: i16,
24873    #[doc = "Z acceleration (raw)"]
24874    pub zacc: i16,
24875    #[doc = "Angular speed around X axis (raw)"]
24876    pub xgyro: i16,
24877    #[doc = "Angular speed around Y axis (raw)"]
24878    pub ygyro: i16,
24879    #[doc = "Angular speed around Z axis (raw)"]
24880    pub zgyro: i16,
24881    #[doc = "X Magnetic field (raw)"]
24882    pub xmag: i16,
24883    #[doc = "Y Magnetic field (raw)"]
24884    pub ymag: i16,
24885    #[doc = "Z Magnetic field (raw)"]
24886    pub zmag: i16,
24887    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
24888    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24889    pub id: u8,
24890    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
24891    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24892    pub temperature: i16,
24893}
24894impl RAW_IMU_DATA {
24895    pub const ENCODED_LEN: usize = 29usize;
24896    pub const DEFAULT: Self = Self {
24897        time_usec: 0_u64,
24898        xacc: 0_i16,
24899        yacc: 0_i16,
24900        zacc: 0_i16,
24901        xgyro: 0_i16,
24902        ygyro: 0_i16,
24903        zgyro: 0_i16,
24904        xmag: 0_i16,
24905        ymag: 0_i16,
24906        zmag: 0_i16,
24907        id: 0_u8,
24908        temperature: 0_i16,
24909    };
24910    #[cfg(feature = "arbitrary")]
24911    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24912        use arbitrary::{Arbitrary, Unstructured};
24913        let mut buf = [0u8; 1024];
24914        rng.fill_bytes(&mut buf);
24915        let mut unstructured = Unstructured::new(&buf);
24916        Self::arbitrary(&mut unstructured).unwrap_or_default()
24917    }
24918}
24919impl Default for RAW_IMU_DATA {
24920    fn default() -> Self {
24921        Self::DEFAULT.clone()
24922    }
24923}
24924impl MessageData for RAW_IMU_DATA {
24925    type Message = MavMessage;
24926    const ID: u32 = 27u32;
24927    const NAME: &'static str = "RAW_IMU";
24928    const EXTRA_CRC: u8 = 144u8;
24929    const ENCODED_LEN: usize = 29usize;
24930    fn deser(
24931        _version: MavlinkVersion,
24932        __input: &[u8],
24933    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24934        let avail_len = __input.len();
24935        let mut payload_buf = [0; Self::ENCODED_LEN];
24936        let mut buf = if avail_len < Self::ENCODED_LEN {
24937            payload_buf[0..avail_len].copy_from_slice(__input);
24938            Bytes::new(&payload_buf)
24939        } else {
24940            Bytes::new(__input)
24941        };
24942        let mut __struct = Self::default();
24943        __struct.time_usec = buf.get_u64_le()?;
24944        __struct.xacc = buf.get_i16_le()?;
24945        __struct.yacc = buf.get_i16_le()?;
24946        __struct.zacc = buf.get_i16_le()?;
24947        __struct.xgyro = buf.get_i16_le()?;
24948        __struct.ygyro = buf.get_i16_le()?;
24949        __struct.zgyro = buf.get_i16_le()?;
24950        __struct.xmag = buf.get_i16_le()?;
24951        __struct.ymag = buf.get_i16_le()?;
24952        __struct.zmag = buf.get_i16_le()?;
24953        __struct.id = buf.get_u8()?;
24954        __struct.temperature = buf.get_i16_le()?;
24955        Ok(__struct)
24956    }
24957    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24958        let mut __tmp = BytesMut::new(bytes);
24959        #[allow(clippy::absurd_extreme_comparisons)]
24960        #[allow(unused_comparisons)]
24961        if __tmp.remaining() < Self::ENCODED_LEN {
24962            panic!(
24963                "buffer is too small (need {} bytes, but got {})",
24964                Self::ENCODED_LEN,
24965                __tmp.remaining(),
24966            )
24967        }
24968        __tmp.put_u64_le(self.time_usec);
24969        __tmp.put_i16_le(self.xacc);
24970        __tmp.put_i16_le(self.yacc);
24971        __tmp.put_i16_le(self.zacc);
24972        __tmp.put_i16_le(self.xgyro);
24973        __tmp.put_i16_le(self.ygyro);
24974        __tmp.put_i16_le(self.zgyro);
24975        __tmp.put_i16_le(self.xmag);
24976        __tmp.put_i16_le(self.ymag);
24977        __tmp.put_i16_le(self.zmag);
24978        if matches!(version, MavlinkVersion::V2) {
24979            __tmp.put_u8(self.id);
24980            __tmp.put_i16_le(self.temperature);
24981            let len = __tmp.len();
24982            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24983        } else {
24984            __tmp.len()
24985        }
24986    }
24987}
24988#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
24989#[doc = ""]
24990#[doc = "ID: 28"]
24991#[derive(Debug, Clone, PartialEq)]
24992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24993#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24994#[cfg_attr(feature = "ts", derive(TS))]
24995#[cfg_attr(feature = "ts", ts(export))]
24996pub struct RAW_PRESSURE_DATA {
24997    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24998    pub time_usec: u64,
24999    #[doc = "Absolute pressure (raw)"]
25000    pub press_abs: i16,
25001    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
25002    pub press_diff1: i16,
25003    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
25004    pub press_diff2: i16,
25005    #[doc = "Raw Temperature measurement (raw)"]
25006    pub temperature: i16,
25007}
25008impl RAW_PRESSURE_DATA {
25009    pub const ENCODED_LEN: usize = 16usize;
25010    pub const DEFAULT: Self = Self {
25011        time_usec: 0_u64,
25012        press_abs: 0_i16,
25013        press_diff1: 0_i16,
25014        press_diff2: 0_i16,
25015        temperature: 0_i16,
25016    };
25017    #[cfg(feature = "arbitrary")]
25018    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25019        use arbitrary::{Arbitrary, Unstructured};
25020        let mut buf = [0u8; 1024];
25021        rng.fill_bytes(&mut buf);
25022        let mut unstructured = Unstructured::new(&buf);
25023        Self::arbitrary(&mut unstructured).unwrap_or_default()
25024    }
25025}
25026impl Default for RAW_PRESSURE_DATA {
25027    fn default() -> Self {
25028        Self::DEFAULT.clone()
25029    }
25030}
25031impl MessageData for RAW_PRESSURE_DATA {
25032    type Message = MavMessage;
25033    const ID: u32 = 28u32;
25034    const NAME: &'static str = "RAW_PRESSURE";
25035    const EXTRA_CRC: u8 = 67u8;
25036    const ENCODED_LEN: usize = 16usize;
25037    fn deser(
25038        _version: MavlinkVersion,
25039        __input: &[u8],
25040    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25041        let avail_len = __input.len();
25042        let mut payload_buf = [0; Self::ENCODED_LEN];
25043        let mut buf = if avail_len < Self::ENCODED_LEN {
25044            payload_buf[0..avail_len].copy_from_slice(__input);
25045            Bytes::new(&payload_buf)
25046        } else {
25047            Bytes::new(__input)
25048        };
25049        let mut __struct = Self::default();
25050        __struct.time_usec = buf.get_u64_le()?;
25051        __struct.press_abs = buf.get_i16_le()?;
25052        __struct.press_diff1 = buf.get_i16_le()?;
25053        __struct.press_diff2 = buf.get_i16_le()?;
25054        __struct.temperature = buf.get_i16_le()?;
25055        Ok(__struct)
25056    }
25057    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25058        let mut __tmp = BytesMut::new(bytes);
25059        #[allow(clippy::absurd_extreme_comparisons)]
25060        #[allow(unused_comparisons)]
25061        if __tmp.remaining() < Self::ENCODED_LEN {
25062            panic!(
25063                "buffer is too small (need {} bytes, but got {})",
25064                Self::ENCODED_LEN,
25065                __tmp.remaining(),
25066            )
25067        }
25068        __tmp.put_u64_le(self.time_usec);
25069        __tmp.put_i16_le(self.press_abs);
25070        __tmp.put_i16_le(self.press_diff1);
25071        __tmp.put_i16_le(self.press_diff2);
25072        __tmp.put_i16_le(self.temperature);
25073        if matches!(version, MavlinkVersion::V2) {
25074            let len = __tmp.len();
25075            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25076        } else {
25077            __tmp.len()
25078        }
25079    }
25080}
25081#[doc = "RPM sensor data message."]
25082#[doc = ""]
25083#[doc = "ID: 339"]
25084#[derive(Debug, Clone, PartialEq)]
25085#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25087#[cfg_attr(feature = "ts", derive(TS))]
25088#[cfg_attr(feature = "ts", ts(export))]
25089pub struct RAW_RPM_DATA {
25090    #[doc = "Indicated rate"]
25091    pub frequency: f32,
25092    #[doc = "Index of this RPM sensor (0-indexed)"]
25093    pub index: u8,
25094}
25095impl RAW_RPM_DATA {
25096    pub const ENCODED_LEN: usize = 5usize;
25097    pub const DEFAULT: Self = Self {
25098        frequency: 0.0_f32,
25099        index: 0_u8,
25100    };
25101    #[cfg(feature = "arbitrary")]
25102    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25103        use arbitrary::{Arbitrary, Unstructured};
25104        let mut buf = [0u8; 1024];
25105        rng.fill_bytes(&mut buf);
25106        let mut unstructured = Unstructured::new(&buf);
25107        Self::arbitrary(&mut unstructured).unwrap_or_default()
25108    }
25109}
25110impl Default for RAW_RPM_DATA {
25111    fn default() -> Self {
25112        Self::DEFAULT.clone()
25113    }
25114}
25115impl MessageData for RAW_RPM_DATA {
25116    type Message = MavMessage;
25117    const ID: u32 = 339u32;
25118    const NAME: &'static str = "RAW_RPM";
25119    const EXTRA_CRC: u8 = 199u8;
25120    const ENCODED_LEN: usize = 5usize;
25121    fn deser(
25122        _version: MavlinkVersion,
25123        __input: &[u8],
25124    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25125        let avail_len = __input.len();
25126        let mut payload_buf = [0; Self::ENCODED_LEN];
25127        let mut buf = if avail_len < Self::ENCODED_LEN {
25128            payload_buf[0..avail_len].copy_from_slice(__input);
25129            Bytes::new(&payload_buf)
25130        } else {
25131            Bytes::new(__input)
25132        };
25133        let mut __struct = Self::default();
25134        __struct.frequency = buf.get_f32_le()?;
25135        __struct.index = buf.get_u8()?;
25136        Ok(__struct)
25137    }
25138    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25139        let mut __tmp = BytesMut::new(bytes);
25140        #[allow(clippy::absurd_extreme_comparisons)]
25141        #[allow(unused_comparisons)]
25142        if __tmp.remaining() < Self::ENCODED_LEN {
25143            panic!(
25144                "buffer is too small (need {} bytes, but got {})",
25145                Self::ENCODED_LEN,
25146                __tmp.remaining(),
25147            )
25148        }
25149        __tmp.put_f32_le(self.frequency);
25150        __tmp.put_u8(self.index);
25151        if matches!(version, MavlinkVersion::V2) {
25152            let len = __tmp.len();
25153            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25154        } else {
25155            __tmp.len()
25156        }
25157    }
25158}
25159#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25160#[doc = ""]
25161#[doc = "ID: 65"]
25162#[derive(Debug, Clone, PartialEq)]
25163#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25165#[cfg_attr(feature = "ts", derive(TS))]
25166#[cfg_attr(feature = "ts", ts(export))]
25167pub struct RC_CHANNELS_DATA {
25168    #[doc = "Timestamp (time since system boot)."]
25169    pub time_boot_ms: u32,
25170    #[doc = "RC channel 1 value."]
25171    pub chan1_raw: u16,
25172    #[doc = "RC channel 2 value."]
25173    pub chan2_raw: u16,
25174    #[doc = "RC channel 3 value."]
25175    pub chan3_raw: u16,
25176    #[doc = "RC channel 4 value."]
25177    pub chan4_raw: u16,
25178    #[doc = "RC channel 5 value."]
25179    pub chan5_raw: u16,
25180    #[doc = "RC channel 6 value."]
25181    pub chan6_raw: u16,
25182    #[doc = "RC channel 7 value."]
25183    pub chan7_raw: u16,
25184    #[doc = "RC channel 8 value."]
25185    pub chan8_raw: u16,
25186    #[doc = "RC channel 9 value."]
25187    pub chan9_raw: u16,
25188    #[doc = "RC channel 10 value."]
25189    pub chan10_raw: u16,
25190    #[doc = "RC channel 11 value."]
25191    pub chan11_raw: u16,
25192    #[doc = "RC channel 12 value."]
25193    pub chan12_raw: u16,
25194    #[doc = "RC channel 13 value."]
25195    pub chan13_raw: u16,
25196    #[doc = "RC channel 14 value."]
25197    pub chan14_raw: u16,
25198    #[doc = "RC channel 15 value."]
25199    pub chan15_raw: u16,
25200    #[doc = "RC channel 16 value."]
25201    pub chan16_raw: u16,
25202    #[doc = "RC channel 17 value."]
25203    pub chan17_raw: u16,
25204    #[doc = "RC channel 18 value."]
25205    pub chan18_raw: u16,
25206    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
25207    pub chancount: u8,
25208    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25209    pub rssi: u8,
25210}
25211impl RC_CHANNELS_DATA {
25212    pub const ENCODED_LEN: usize = 42usize;
25213    pub const DEFAULT: Self = Self {
25214        time_boot_ms: 0_u32,
25215        chan1_raw: 0_u16,
25216        chan2_raw: 0_u16,
25217        chan3_raw: 0_u16,
25218        chan4_raw: 0_u16,
25219        chan5_raw: 0_u16,
25220        chan6_raw: 0_u16,
25221        chan7_raw: 0_u16,
25222        chan8_raw: 0_u16,
25223        chan9_raw: 0_u16,
25224        chan10_raw: 0_u16,
25225        chan11_raw: 0_u16,
25226        chan12_raw: 0_u16,
25227        chan13_raw: 0_u16,
25228        chan14_raw: 0_u16,
25229        chan15_raw: 0_u16,
25230        chan16_raw: 0_u16,
25231        chan17_raw: 0_u16,
25232        chan18_raw: 0_u16,
25233        chancount: 0_u8,
25234        rssi: 0_u8,
25235    };
25236    #[cfg(feature = "arbitrary")]
25237    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25238        use arbitrary::{Arbitrary, Unstructured};
25239        let mut buf = [0u8; 1024];
25240        rng.fill_bytes(&mut buf);
25241        let mut unstructured = Unstructured::new(&buf);
25242        Self::arbitrary(&mut unstructured).unwrap_or_default()
25243    }
25244}
25245impl Default for RC_CHANNELS_DATA {
25246    fn default() -> Self {
25247        Self::DEFAULT.clone()
25248    }
25249}
25250impl MessageData for RC_CHANNELS_DATA {
25251    type Message = MavMessage;
25252    const ID: u32 = 65u32;
25253    const NAME: &'static str = "RC_CHANNELS";
25254    const EXTRA_CRC: u8 = 118u8;
25255    const ENCODED_LEN: usize = 42usize;
25256    fn deser(
25257        _version: MavlinkVersion,
25258        __input: &[u8],
25259    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25260        let avail_len = __input.len();
25261        let mut payload_buf = [0; Self::ENCODED_LEN];
25262        let mut buf = if avail_len < Self::ENCODED_LEN {
25263            payload_buf[0..avail_len].copy_from_slice(__input);
25264            Bytes::new(&payload_buf)
25265        } else {
25266            Bytes::new(__input)
25267        };
25268        let mut __struct = Self::default();
25269        __struct.time_boot_ms = buf.get_u32_le()?;
25270        __struct.chan1_raw = buf.get_u16_le()?;
25271        __struct.chan2_raw = buf.get_u16_le()?;
25272        __struct.chan3_raw = buf.get_u16_le()?;
25273        __struct.chan4_raw = buf.get_u16_le()?;
25274        __struct.chan5_raw = buf.get_u16_le()?;
25275        __struct.chan6_raw = buf.get_u16_le()?;
25276        __struct.chan7_raw = buf.get_u16_le()?;
25277        __struct.chan8_raw = buf.get_u16_le()?;
25278        __struct.chan9_raw = buf.get_u16_le()?;
25279        __struct.chan10_raw = buf.get_u16_le()?;
25280        __struct.chan11_raw = buf.get_u16_le()?;
25281        __struct.chan12_raw = buf.get_u16_le()?;
25282        __struct.chan13_raw = buf.get_u16_le()?;
25283        __struct.chan14_raw = buf.get_u16_le()?;
25284        __struct.chan15_raw = buf.get_u16_le()?;
25285        __struct.chan16_raw = buf.get_u16_le()?;
25286        __struct.chan17_raw = buf.get_u16_le()?;
25287        __struct.chan18_raw = buf.get_u16_le()?;
25288        __struct.chancount = buf.get_u8()?;
25289        __struct.rssi = buf.get_u8()?;
25290        Ok(__struct)
25291    }
25292    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25293        let mut __tmp = BytesMut::new(bytes);
25294        #[allow(clippy::absurd_extreme_comparisons)]
25295        #[allow(unused_comparisons)]
25296        if __tmp.remaining() < Self::ENCODED_LEN {
25297            panic!(
25298                "buffer is too small (need {} bytes, but got {})",
25299                Self::ENCODED_LEN,
25300                __tmp.remaining(),
25301            )
25302        }
25303        __tmp.put_u32_le(self.time_boot_ms);
25304        __tmp.put_u16_le(self.chan1_raw);
25305        __tmp.put_u16_le(self.chan2_raw);
25306        __tmp.put_u16_le(self.chan3_raw);
25307        __tmp.put_u16_le(self.chan4_raw);
25308        __tmp.put_u16_le(self.chan5_raw);
25309        __tmp.put_u16_le(self.chan6_raw);
25310        __tmp.put_u16_le(self.chan7_raw);
25311        __tmp.put_u16_le(self.chan8_raw);
25312        __tmp.put_u16_le(self.chan9_raw);
25313        __tmp.put_u16_le(self.chan10_raw);
25314        __tmp.put_u16_le(self.chan11_raw);
25315        __tmp.put_u16_le(self.chan12_raw);
25316        __tmp.put_u16_le(self.chan13_raw);
25317        __tmp.put_u16_le(self.chan14_raw);
25318        __tmp.put_u16_le(self.chan15_raw);
25319        __tmp.put_u16_le(self.chan16_raw);
25320        __tmp.put_u16_le(self.chan17_raw);
25321        __tmp.put_u16_le(self.chan18_raw);
25322        __tmp.put_u8(self.chancount);
25323        __tmp.put_u8(self.rssi);
25324        if matches!(version, MavlinkVersion::V2) {
25325            let len = __tmp.len();
25326            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25327        } else {
25328            __tmp.len()
25329        }
25330    }
25331}
25332#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
25333#[doc = ""]
25334#[doc = "ID: 70"]
25335#[derive(Debug, Clone, PartialEq)]
25336#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25337#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25338#[cfg_attr(feature = "ts", derive(TS))]
25339#[cfg_attr(feature = "ts", ts(export))]
25340pub struct RC_CHANNELS_OVERRIDE_DATA {
25341    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25342    pub chan1_raw: u16,
25343    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25344    pub chan2_raw: u16,
25345    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25346    pub chan3_raw: u16,
25347    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25348    pub chan4_raw: u16,
25349    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25350    pub chan5_raw: u16,
25351    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25352    pub chan6_raw: u16,
25353    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25354    pub chan7_raw: u16,
25355    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25356    pub chan8_raw: u16,
25357    #[doc = "System ID"]
25358    pub target_system: u8,
25359    #[doc = "Component ID"]
25360    pub target_component: u8,
25361    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25362    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25363    pub chan9_raw: u16,
25364    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25365    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25366    pub chan10_raw: u16,
25367    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25368    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25369    pub chan11_raw: u16,
25370    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25371    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25372    pub chan12_raw: u16,
25373    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25374    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25375    pub chan13_raw: u16,
25376    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25377    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25378    pub chan14_raw: u16,
25379    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25380    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25381    pub chan15_raw: u16,
25382    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25383    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25384    pub chan16_raw: u16,
25385    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25386    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25387    pub chan17_raw: u16,
25388    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25389    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25390    pub chan18_raw: u16,
25391}
25392impl RC_CHANNELS_OVERRIDE_DATA {
25393    pub const ENCODED_LEN: usize = 38usize;
25394    pub const DEFAULT: Self = Self {
25395        chan1_raw: 0_u16,
25396        chan2_raw: 0_u16,
25397        chan3_raw: 0_u16,
25398        chan4_raw: 0_u16,
25399        chan5_raw: 0_u16,
25400        chan6_raw: 0_u16,
25401        chan7_raw: 0_u16,
25402        chan8_raw: 0_u16,
25403        target_system: 0_u8,
25404        target_component: 0_u8,
25405        chan9_raw: 0_u16,
25406        chan10_raw: 0_u16,
25407        chan11_raw: 0_u16,
25408        chan12_raw: 0_u16,
25409        chan13_raw: 0_u16,
25410        chan14_raw: 0_u16,
25411        chan15_raw: 0_u16,
25412        chan16_raw: 0_u16,
25413        chan17_raw: 0_u16,
25414        chan18_raw: 0_u16,
25415    };
25416    #[cfg(feature = "arbitrary")]
25417    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25418        use arbitrary::{Arbitrary, Unstructured};
25419        let mut buf = [0u8; 1024];
25420        rng.fill_bytes(&mut buf);
25421        let mut unstructured = Unstructured::new(&buf);
25422        Self::arbitrary(&mut unstructured).unwrap_or_default()
25423    }
25424}
25425impl Default for RC_CHANNELS_OVERRIDE_DATA {
25426    fn default() -> Self {
25427        Self::DEFAULT.clone()
25428    }
25429}
25430impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
25431    type Message = MavMessage;
25432    const ID: u32 = 70u32;
25433    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
25434    const EXTRA_CRC: u8 = 124u8;
25435    const ENCODED_LEN: usize = 38usize;
25436    fn deser(
25437        _version: MavlinkVersion,
25438        __input: &[u8],
25439    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25440        let avail_len = __input.len();
25441        let mut payload_buf = [0; Self::ENCODED_LEN];
25442        let mut buf = if avail_len < Self::ENCODED_LEN {
25443            payload_buf[0..avail_len].copy_from_slice(__input);
25444            Bytes::new(&payload_buf)
25445        } else {
25446            Bytes::new(__input)
25447        };
25448        let mut __struct = Self::default();
25449        __struct.chan1_raw = buf.get_u16_le()?;
25450        __struct.chan2_raw = buf.get_u16_le()?;
25451        __struct.chan3_raw = buf.get_u16_le()?;
25452        __struct.chan4_raw = buf.get_u16_le()?;
25453        __struct.chan5_raw = buf.get_u16_le()?;
25454        __struct.chan6_raw = buf.get_u16_le()?;
25455        __struct.chan7_raw = buf.get_u16_le()?;
25456        __struct.chan8_raw = buf.get_u16_le()?;
25457        __struct.target_system = buf.get_u8()?;
25458        __struct.target_component = buf.get_u8()?;
25459        __struct.chan9_raw = buf.get_u16_le()?;
25460        __struct.chan10_raw = buf.get_u16_le()?;
25461        __struct.chan11_raw = buf.get_u16_le()?;
25462        __struct.chan12_raw = buf.get_u16_le()?;
25463        __struct.chan13_raw = buf.get_u16_le()?;
25464        __struct.chan14_raw = buf.get_u16_le()?;
25465        __struct.chan15_raw = buf.get_u16_le()?;
25466        __struct.chan16_raw = buf.get_u16_le()?;
25467        __struct.chan17_raw = buf.get_u16_le()?;
25468        __struct.chan18_raw = buf.get_u16_le()?;
25469        Ok(__struct)
25470    }
25471    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25472        let mut __tmp = BytesMut::new(bytes);
25473        #[allow(clippy::absurd_extreme_comparisons)]
25474        #[allow(unused_comparisons)]
25475        if __tmp.remaining() < Self::ENCODED_LEN {
25476            panic!(
25477                "buffer is too small (need {} bytes, but got {})",
25478                Self::ENCODED_LEN,
25479                __tmp.remaining(),
25480            )
25481        }
25482        __tmp.put_u16_le(self.chan1_raw);
25483        __tmp.put_u16_le(self.chan2_raw);
25484        __tmp.put_u16_le(self.chan3_raw);
25485        __tmp.put_u16_le(self.chan4_raw);
25486        __tmp.put_u16_le(self.chan5_raw);
25487        __tmp.put_u16_le(self.chan6_raw);
25488        __tmp.put_u16_le(self.chan7_raw);
25489        __tmp.put_u16_le(self.chan8_raw);
25490        __tmp.put_u8(self.target_system);
25491        __tmp.put_u8(self.target_component);
25492        if matches!(version, MavlinkVersion::V2) {
25493            __tmp.put_u16_le(self.chan9_raw);
25494            __tmp.put_u16_le(self.chan10_raw);
25495            __tmp.put_u16_le(self.chan11_raw);
25496            __tmp.put_u16_le(self.chan12_raw);
25497            __tmp.put_u16_le(self.chan13_raw);
25498            __tmp.put_u16_le(self.chan14_raw);
25499            __tmp.put_u16_le(self.chan15_raw);
25500            __tmp.put_u16_le(self.chan16_raw);
25501            __tmp.put_u16_le(self.chan17_raw);
25502            __tmp.put_u16_le(self.chan18_raw);
25503            let len = __tmp.len();
25504            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25505        } else {
25506            __tmp.len()
25507        }
25508    }
25509}
25510#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25511#[doc = ""]
25512#[doc = "ID: 35"]
25513#[derive(Debug, Clone, PartialEq)]
25514#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25515#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25516#[cfg_attr(feature = "ts", derive(TS))]
25517#[cfg_attr(feature = "ts", ts(export))]
25518pub struct RC_CHANNELS_RAW_DATA {
25519    #[doc = "Timestamp (time since system boot)."]
25520    pub time_boot_ms: u32,
25521    #[doc = "RC channel 1 value."]
25522    pub chan1_raw: u16,
25523    #[doc = "RC channel 2 value."]
25524    pub chan2_raw: u16,
25525    #[doc = "RC channel 3 value."]
25526    pub chan3_raw: u16,
25527    #[doc = "RC channel 4 value."]
25528    pub chan4_raw: u16,
25529    #[doc = "RC channel 5 value."]
25530    pub chan5_raw: u16,
25531    #[doc = "RC channel 6 value."]
25532    pub chan6_raw: u16,
25533    #[doc = "RC channel 7 value."]
25534    pub chan7_raw: u16,
25535    #[doc = "RC channel 8 value."]
25536    pub chan8_raw: u16,
25537    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25538    pub port: u8,
25539    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25540    pub rssi: u8,
25541}
25542impl RC_CHANNELS_RAW_DATA {
25543    pub const ENCODED_LEN: usize = 22usize;
25544    pub const DEFAULT: Self = Self {
25545        time_boot_ms: 0_u32,
25546        chan1_raw: 0_u16,
25547        chan2_raw: 0_u16,
25548        chan3_raw: 0_u16,
25549        chan4_raw: 0_u16,
25550        chan5_raw: 0_u16,
25551        chan6_raw: 0_u16,
25552        chan7_raw: 0_u16,
25553        chan8_raw: 0_u16,
25554        port: 0_u8,
25555        rssi: 0_u8,
25556    };
25557    #[cfg(feature = "arbitrary")]
25558    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25559        use arbitrary::{Arbitrary, Unstructured};
25560        let mut buf = [0u8; 1024];
25561        rng.fill_bytes(&mut buf);
25562        let mut unstructured = Unstructured::new(&buf);
25563        Self::arbitrary(&mut unstructured).unwrap_or_default()
25564    }
25565}
25566impl Default for RC_CHANNELS_RAW_DATA {
25567    fn default() -> Self {
25568        Self::DEFAULT.clone()
25569    }
25570}
25571impl MessageData for RC_CHANNELS_RAW_DATA {
25572    type Message = MavMessage;
25573    const ID: u32 = 35u32;
25574    const NAME: &'static str = "RC_CHANNELS_RAW";
25575    const EXTRA_CRC: u8 = 244u8;
25576    const ENCODED_LEN: usize = 22usize;
25577    fn deser(
25578        _version: MavlinkVersion,
25579        __input: &[u8],
25580    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25581        let avail_len = __input.len();
25582        let mut payload_buf = [0; Self::ENCODED_LEN];
25583        let mut buf = if avail_len < Self::ENCODED_LEN {
25584            payload_buf[0..avail_len].copy_from_slice(__input);
25585            Bytes::new(&payload_buf)
25586        } else {
25587            Bytes::new(__input)
25588        };
25589        let mut __struct = Self::default();
25590        __struct.time_boot_ms = buf.get_u32_le()?;
25591        __struct.chan1_raw = buf.get_u16_le()?;
25592        __struct.chan2_raw = buf.get_u16_le()?;
25593        __struct.chan3_raw = buf.get_u16_le()?;
25594        __struct.chan4_raw = buf.get_u16_le()?;
25595        __struct.chan5_raw = buf.get_u16_le()?;
25596        __struct.chan6_raw = buf.get_u16_le()?;
25597        __struct.chan7_raw = buf.get_u16_le()?;
25598        __struct.chan8_raw = buf.get_u16_le()?;
25599        __struct.port = buf.get_u8()?;
25600        __struct.rssi = buf.get_u8()?;
25601        Ok(__struct)
25602    }
25603    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25604        let mut __tmp = BytesMut::new(bytes);
25605        #[allow(clippy::absurd_extreme_comparisons)]
25606        #[allow(unused_comparisons)]
25607        if __tmp.remaining() < Self::ENCODED_LEN {
25608            panic!(
25609                "buffer is too small (need {} bytes, but got {})",
25610                Self::ENCODED_LEN,
25611                __tmp.remaining(),
25612            )
25613        }
25614        __tmp.put_u32_le(self.time_boot_ms);
25615        __tmp.put_u16_le(self.chan1_raw);
25616        __tmp.put_u16_le(self.chan2_raw);
25617        __tmp.put_u16_le(self.chan3_raw);
25618        __tmp.put_u16_le(self.chan4_raw);
25619        __tmp.put_u16_le(self.chan5_raw);
25620        __tmp.put_u16_le(self.chan6_raw);
25621        __tmp.put_u16_le(self.chan7_raw);
25622        __tmp.put_u16_le(self.chan8_raw);
25623        __tmp.put_u8(self.port);
25624        __tmp.put_u8(self.rssi);
25625        if matches!(version, MavlinkVersion::V2) {
25626            let len = __tmp.len();
25627            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25628        } else {
25629            __tmp.len()
25630        }
25631    }
25632}
25633#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
25634#[doc = ""]
25635#[doc = "ID: 34"]
25636#[derive(Debug, Clone, PartialEq)]
25637#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25638#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25639#[cfg_attr(feature = "ts", derive(TS))]
25640#[cfg_attr(feature = "ts", ts(export))]
25641pub struct RC_CHANNELS_SCALED_DATA {
25642    #[doc = "Timestamp (time since system boot)."]
25643    pub time_boot_ms: u32,
25644    #[doc = "RC channel 1 value scaled."]
25645    pub chan1_scaled: i16,
25646    #[doc = "RC channel 2 value scaled."]
25647    pub chan2_scaled: i16,
25648    #[doc = "RC channel 3 value scaled."]
25649    pub chan3_scaled: i16,
25650    #[doc = "RC channel 4 value scaled."]
25651    pub chan4_scaled: i16,
25652    #[doc = "RC channel 5 value scaled."]
25653    pub chan5_scaled: i16,
25654    #[doc = "RC channel 6 value scaled."]
25655    pub chan6_scaled: i16,
25656    #[doc = "RC channel 7 value scaled."]
25657    pub chan7_scaled: i16,
25658    #[doc = "RC channel 8 value scaled."]
25659    pub chan8_scaled: i16,
25660    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25661    pub port: u8,
25662    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25663    pub rssi: u8,
25664}
25665impl RC_CHANNELS_SCALED_DATA {
25666    pub const ENCODED_LEN: usize = 22usize;
25667    pub const DEFAULT: Self = Self {
25668        time_boot_ms: 0_u32,
25669        chan1_scaled: 0_i16,
25670        chan2_scaled: 0_i16,
25671        chan3_scaled: 0_i16,
25672        chan4_scaled: 0_i16,
25673        chan5_scaled: 0_i16,
25674        chan6_scaled: 0_i16,
25675        chan7_scaled: 0_i16,
25676        chan8_scaled: 0_i16,
25677        port: 0_u8,
25678        rssi: 0_u8,
25679    };
25680    #[cfg(feature = "arbitrary")]
25681    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25682        use arbitrary::{Arbitrary, Unstructured};
25683        let mut buf = [0u8; 1024];
25684        rng.fill_bytes(&mut buf);
25685        let mut unstructured = Unstructured::new(&buf);
25686        Self::arbitrary(&mut unstructured).unwrap_or_default()
25687    }
25688}
25689impl Default for RC_CHANNELS_SCALED_DATA {
25690    fn default() -> Self {
25691        Self::DEFAULT.clone()
25692    }
25693}
25694impl MessageData for RC_CHANNELS_SCALED_DATA {
25695    type Message = MavMessage;
25696    const ID: u32 = 34u32;
25697    const NAME: &'static str = "RC_CHANNELS_SCALED";
25698    const EXTRA_CRC: u8 = 237u8;
25699    const ENCODED_LEN: usize = 22usize;
25700    fn deser(
25701        _version: MavlinkVersion,
25702        __input: &[u8],
25703    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25704        let avail_len = __input.len();
25705        let mut payload_buf = [0; Self::ENCODED_LEN];
25706        let mut buf = if avail_len < Self::ENCODED_LEN {
25707            payload_buf[0..avail_len].copy_from_slice(__input);
25708            Bytes::new(&payload_buf)
25709        } else {
25710            Bytes::new(__input)
25711        };
25712        let mut __struct = Self::default();
25713        __struct.time_boot_ms = buf.get_u32_le()?;
25714        __struct.chan1_scaled = buf.get_i16_le()?;
25715        __struct.chan2_scaled = buf.get_i16_le()?;
25716        __struct.chan3_scaled = buf.get_i16_le()?;
25717        __struct.chan4_scaled = buf.get_i16_le()?;
25718        __struct.chan5_scaled = buf.get_i16_le()?;
25719        __struct.chan6_scaled = buf.get_i16_le()?;
25720        __struct.chan7_scaled = buf.get_i16_le()?;
25721        __struct.chan8_scaled = buf.get_i16_le()?;
25722        __struct.port = buf.get_u8()?;
25723        __struct.rssi = buf.get_u8()?;
25724        Ok(__struct)
25725    }
25726    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25727        let mut __tmp = BytesMut::new(bytes);
25728        #[allow(clippy::absurd_extreme_comparisons)]
25729        #[allow(unused_comparisons)]
25730        if __tmp.remaining() < Self::ENCODED_LEN {
25731            panic!(
25732                "buffer is too small (need {} bytes, but got {})",
25733                Self::ENCODED_LEN,
25734                __tmp.remaining(),
25735            )
25736        }
25737        __tmp.put_u32_le(self.time_boot_ms);
25738        __tmp.put_i16_le(self.chan1_scaled);
25739        __tmp.put_i16_le(self.chan2_scaled);
25740        __tmp.put_i16_le(self.chan3_scaled);
25741        __tmp.put_i16_le(self.chan4_scaled);
25742        __tmp.put_i16_le(self.chan5_scaled);
25743        __tmp.put_i16_le(self.chan6_scaled);
25744        __tmp.put_i16_le(self.chan7_scaled);
25745        __tmp.put_i16_le(self.chan8_scaled);
25746        __tmp.put_u8(self.port);
25747        __tmp.put_u8(self.rssi);
25748        if matches!(version, MavlinkVersion::V2) {
25749            let len = __tmp.len();
25750            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25751        } else {
25752            __tmp.len()
25753        }
25754    }
25755}
25756#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
25757#[doc = "Request a data stream."]
25758#[doc = ""]
25759#[doc = "ID: 66"]
25760#[derive(Debug, Clone, PartialEq)]
25761#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25762#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25763#[cfg_attr(feature = "ts", derive(TS))]
25764#[cfg_attr(feature = "ts", ts(export))]
25765pub struct REQUEST_DATA_STREAM_DATA {
25766    #[doc = "The requested message rate"]
25767    pub req_message_rate: u16,
25768    #[doc = "The target requested to send the message stream."]
25769    pub target_system: u8,
25770    #[doc = "The target requested to send the message stream."]
25771    pub target_component: u8,
25772    #[doc = "The ID of the requested data stream"]
25773    pub req_stream_id: u8,
25774    #[doc = "1 to start sending, 0 to stop sending."]
25775    pub start_stop: u8,
25776}
25777impl REQUEST_DATA_STREAM_DATA {
25778    pub const ENCODED_LEN: usize = 6usize;
25779    pub const DEFAULT: Self = Self {
25780        req_message_rate: 0_u16,
25781        target_system: 0_u8,
25782        target_component: 0_u8,
25783        req_stream_id: 0_u8,
25784        start_stop: 0_u8,
25785    };
25786    #[cfg(feature = "arbitrary")]
25787    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25788        use arbitrary::{Arbitrary, Unstructured};
25789        let mut buf = [0u8; 1024];
25790        rng.fill_bytes(&mut buf);
25791        let mut unstructured = Unstructured::new(&buf);
25792        Self::arbitrary(&mut unstructured).unwrap_or_default()
25793    }
25794}
25795impl Default for REQUEST_DATA_STREAM_DATA {
25796    fn default() -> Self {
25797        Self::DEFAULT.clone()
25798    }
25799}
25800impl MessageData for REQUEST_DATA_STREAM_DATA {
25801    type Message = MavMessage;
25802    const ID: u32 = 66u32;
25803    const NAME: &'static str = "REQUEST_DATA_STREAM";
25804    const EXTRA_CRC: u8 = 148u8;
25805    const ENCODED_LEN: usize = 6usize;
25806    fn deser(
25807        _version: MavlinkVersion,
25808        __input: &[u8],
25809    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25810        let avail_len = __input.len();
25811        let mut payload_buf = [0; Self::ENCODED_LEN];
25812        let mut buf = if avail_len < Self::ENCODED_LEN {
25813            payload_buf[0..avail_len].copy_from_slice(__input);
25814            Bytes::new(&payload_buf)
25815        } else {
25816            Bytes::new(__input)
25817        };
25818        let mut __struct = Self::default();
25819        __struct.req_message_rate = buf.get_u16_le()?;
25820        __struct.target_system = buf.get_u8()?;
25821        __struct.target_component = buf.get_u8()?;
25822        __struct.req_stream_id = buf.get_u8()?;
25823        __struct.start_stop = buf.get_u8()?;
25824        Ok(__struct)
25825    }
25826    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25827        let mut __tmp = BytesMut::new(bytes);
25828        #[allow(clippy::absurd_extreme_comparisons)]
25829        #[allow(unused_comparisons)]
25830        if __tmp.remaining() < Self::ENCODED_LEN {
25831            panic!(
25832                "buffer is too small (need {} bytes, but got {})",
25833                Self::ENCODED_LEN,
25834                __tmp.remaining(),
25835            )
25836        }
25837        __tmp.put_u16_le(self.req_message_rate);
25838        __tmp.put_u8(self.target_system);
25839        __tmp.put_u8(self.target_component);
25840        __tmp.put_u8(self.req_stream_id);
25841        __tmp.put_u8(self.start_stop);
25842        if matches!(version, MavlinkVersion::V2) {
25843            let len = __tmp.len();
25844            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25845        } else {
25846            __tmp.len()
25847        }
25848    }
25849}
25850#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
25851#[doc = ""]
25852#[doc = "ID: 412"]
25853#[derive(Debug, Clone, PartialEq)]
25854#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25855#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25856#[cfg_attr(feature = "ts", derive(TS))]
25857#[cfg_attr(feature = "ts", ts(export))]
25858pub struct REQUEST_EVENT_DATA {
25859    #[doc = "First sequence number of the requested event."]
25860    pub first_sequence: u16,
25861    #[doc = "Last sequence number of the requested event."]
25862    pub last_sequence: u16,
25863    #[doc = "System ID"]
25864    pub target_system: u8,
25865    #[doc = "Component ID"]
25866    pub target_component: u8,
25867}
25868impl REQUEST_EVENT_DATA {
25869    pub const ENCODED_LEN: usize = 6usize;
25870    pub const DEFAULT: Self = Self {
25871        first_sequence: 0_u16,
25872        last_sequence: 0_u16,
25873        target_system: 0_u8,
25874        target_component: 0_u8,
25875    };
25876    #[cfg(feature = "arbitrary")]
25877    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25878        use arbitrary::{Arbitrary, Unstructured};
25879        let mut buf = [0u8; 1024];
25880        rng.fill_bytes(&mut buf);
25881        let mut unstructured = Unstructured::new(&buf);
25882        Self::arbitrary(&mut unstructured).unwrap_or_default()
25883    }
25884}
25885impl Default for REQUEST_EVENT_DATA {
25886    fn default() -> Self {
25887        Self::DEFAULT.clone()
25888    }
25889}
25890impl MessageData for REQUEST_EVENT_DATA {
25891    type Message = MavMessage;
25892    const ID: u32 = 412u32;
25893    const NAME: &'static str = "REQUEST_EVENT";
25894    const EXTRA_CRC: u8 = 33u8;
25895    const ENCODED_LEN: usize = 6usize;
25896    fn deser(
25897        _version: MavlinkVersion,
25898        __input: &[u8],
25899    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25900        let avail_len = __input.len();
25901        let mut payload_buf = [0; Self::ENCODED_LEN];
25902        let mut buf = if avail_len < Self::ENCODED_LEN {
25903            payload_buf[0..avail_len].copy_from_slice(__input);
25904            Bytes::new(&payload_buf)
25905        } else {
25906            Bytes::new(__input)
25907        };
25908        let mut __struct = Self::default();
25909        __struct.first_sequence = buf.get_u16_le()?;
25910        __struct.last_sequence = buf.get_u16_le()?;
25911        __struct.target_system = buf.get_u8()?;
25912        __struct.target_component = buf.get_u8()?;
25913        Ok(__struct)
25914    }
25915    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25916        let mut __tmp = BytesMut::new(bytes);
25917        #[allow(clippy::absurd_extreme_comparisons)]
25918        #[allow(unused_comparisons)]
25919        if __tmp.remaining() < Self::ENCODED_LEN {
25920            panic!(
25921                "buffer is too small (need {} bytes, but got {})",
25922                Self::ENCODED_LEN,
25923                __tmp.remaining(),
25924            )
25925        }
25926        __tmp.put_u16_le(self.first_sequence);
25927        __tmp.put_u16_le(self.last_sequence);
25928        __tmp.put_u8(self.target_system);
25929        __tmp.put_u8(self.target_component);
25930        if matches!(version, MavlinkVersion::V2) {
25931            let len = __tmp.len();
25932            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25933        } else {
25934            __tmp.len()
25935        }
25936    }
25937}
25938#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
25939#[doc = ""]
25940#[doc = "ID: 142"]
25941#[derive(Debug, Clone, PartialEq)]
25942#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25943#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25944#[cfg_attr(feature = "ts", derive(TS))]
25945#[cfg_attr(feature = "ts", ts(export))]
25946pub struct RESOURCE_REQUEST_DATA {
25947    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
25948    pub request_id: u8,
25949    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
25950    pub uri_type: u8,
25951    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
25952    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25953    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25954    pub uri: [u8; 120],
25955    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
25956    pub transfer_type: u8,
25957    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
25958    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25959    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25960    pub storage: [u8; 120],
25961}
25962impl RESOURCE_REQUEST_DATA {
25963    pub const ENCODED_LEN: usize = 243usize;
25964    pub const DEFAULT: Self = Self {
25965        request_id: 0_u8,
25966        uri_type: 0_u8,
25967        uri: [0_u8; 120usize],
25968        transfer_type: 0_u8,
25969        storage: [0_u8; 120usize],
25970    };
25971    #[cfg(feature = "arbitrary")]
25972    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25973        use arbitrary::{Arbitrary, Unstructured};
25974        let mut buf = [0u8; 1024];
25975        rng.fill_bytes(&mut buf);
25976        let mut unstructured = Unstructured::new(&buf);
25977        Self::arbitrary(&mut unstructured).unwrap_or_default()
25978    }
25979}
25980impl Default for RESOURCE_REQUEST_DATA {
25981    fn default() -> Self {
25982        Self::DEFAULT.clone()
25983    }
25984}
25985impl MessageData for RESOURCE_REQUEST_DATA {
25986    type Message = MavMessage;
25987    const ID: u32 = 142u32;
25988    const NAME: &'static str = "RESOURCE_REQUEST";
25989    const EXTRA_CRC: u8 = 72u8;
25990    const ENCODED_LEN: usize = 243usize;
25991    fn deser(
25992        _version: MavlinkVersion,
25993        __input: &[u8],
25994    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25995        let avail_len = __input.len();
25996        let mut payload_buf = [0; Self::ENCODED_LEN];
25997        let mut buf = if avail_len < Self::ENCODED_LEN {
25998            payload_buf[0..avail_len].copy_from_slice(__input);
25999            Bytes::new(&payload_buf)
26000        } else {
26001            Bytes::new(__input)
26002        };
26003        let mut __struct = Self::default();
26004        __struct.request_id = buf.get_u8()?;
26005        __struct.uri_type = buf.get_u8()?;
26006        for v in &mut __struct.uri {
26007            let val = buf.get_u8()?;
26008            *v = val;
26009        }
26010        __struct.transfer_type = buf.get_u8()?;
26011        for v in &mut __struct.storage {
26012            let val = buf.get_u8()?;
26013            *v = val;
26014        }
26015        Ok(__struct)
26016    }
26017    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26018        let mut __tmp = BytesMut::new(bytes);
26019        #[allow(clippy::absurd_extreme_comparisons)]
26020        #[allow(unused_comparisons)]
26021        if __tmp.remaining() < Self::ENCODED_LEN {
26022            panic!(
26023                "buffer is too small (need {} bytes, but got {})",
26024                Self::ENCODED_LEN,
26025                __tmp.remaining(),
26026            )
26027        }
26028        __tmp.put_u8(self.request_id);
26029        __tmp.put_u8(self.uri_type);
26030        for val in &self.uri {
26031            __tmp.put_u8(*val);
26032        }
26033        __tmp.put_u8(self.transfer_type);
26034        for val in &self.storage {
26035            __tmp.put_u8(*val);
26036        }
26037        if matches!(version, MavlinkVersion::V2) {
26038            let len = __tmp.len();
26039            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26040        } else {
26041            __tmp.len()
26042        }
26043    }
26044}
26045#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
26046#[doc = ""]
26047#[doc = "ID: 413"]
26048#[derive(Debug, Clone, PartialEq)]
26049#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26050#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26051#[cfg_attr(feature = "ts", derive(TS))]
26052#[cfg_attr(feature = "ts", ts(export))]
26053pub struct RESPONSE_EVENT_ERROR_DATA {
26054    #[doc = "Sequence number."]
26055    pub sequence: u16,
26056    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
26057    pub sequence_oldest_available: u16,
26058    #[doc = "System ID"]
26059    pub target_system: u8,
26060    #[doc = "Component ID"]
26061    pub target_component: u8,
26062    #[doc = "Error reason."]
26063    pub reason: MavEventErrorReason,
26064}
26065impl RESPONSE_EVENT_ERROR_DATA {
26066    pub const ENCODED_LEN: usize = 7usize;
26067    pub const DEFAULT: Self = Self {
26068        sequence: 0_u16,
26069        sequence_oldest_available: 0_u16,
26070        target_system: 0_u8,
26071        target_component: 0_u8,
26072        reason: MavEventErrorReason::DEFAULT,
26073    };
26074    #[cfg(feature = "arbitrary")]
26075    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26076        use arbitrary::{Arbitrary, Unstructured};
26077        let mut buf = [0u8; 1024];
26078        rng.fill_bytes(&mut buf);
26079        let mut unstructured = Unstructured::new(&buf);
26080        Self::arbitrary(&mut unstructured).unwrap_or_default()
26081    }
26082}
26083impl Default for RESPONSE_EVENT_ERROR_DATA {
26084    fn default() -> Self {
26085        Self::DEFAULT.clone()
26086    }
26087}
26088impl MessageData for RESPONSE_EVENT_ERROR_DATA {
26089    type Message = MavMessage;
26090    const ID: u32 = 413u32;
26091    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
26092    const EXTRA_CRC: u8 = 77u8;
26093    const ENCODED_LEN: usize = 7usize;
26094    fn deser(
26095        _version: MavlinkVersion,
26096        __input: &[u8],
26097    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26098        let avail_len = __input.len();
26099        let mut payload_buf = [0; Self::ENCODED_LEN];
26100        let mut buf = if avail_len < Self::ENCODED_LEN {
26101            payload_buf[0..avail_len].copy_from_slice(__input);
26102            Bytes::new(&payload_buf)
26103        } else {
26104            Bytes::new(__input)
26105        };
26106        let mut __struct = Self::default();
26107        __struct.sequence = buf.get_u16_le()?;
26108        __struct.sequence_oldest_available = buf.get_u16_le()?;
26109        __struct.target_system = buf.get_u8()?;
26110        __struct.target_component = buf.get_u8()?;
26111        let tmp = buf.get_u8()?;
26112        __struct.reason =
26113            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26114                enum_type: "MavEventErrorReason",
26115                value: tmp as u64,
26116            })?;
26117        Ok(__struct)
26118    }
26119    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26120        let mut __tmp = BytesMut::new(bytes);
26121        #[allow(clippy::absurd_extreme_comparisons)]
26122        #[allow(unused_comparisons)]
26123        if __tmp.remaining() < Self::ENCODED_LEN {
26124            panic!(
26125                "buffer is too small (need {} bytes, but got {})",
26126                Self::ENCODED_LEN,
26127                __tmp.remaining(),
26128            )
26129        }
26130        __tmp.put_u16_le(self.sequence);
26131        __tmp.put_u16_le(self.sequence_oldest_available);
26132        __tmp.put_u8(self.target_system);
26133        __tmp.put_u8(self.target_component);
26134        __tmp.put_u8(self.reason as u8);
26135        if matches!(version, MavlinkVersion::V2) {
26136            let len = __tmp.len();
26137            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26138        } else {
26139            __tmp.len()
26140        }
26141    }
26142}
26143#[doc = "Read out the safety zone the MAV currently assumes."]
26144#[doc = ""]
26145#[doc = "ID: 55"]
26146#[derive(Debug, Clone, PartialEq)]
26147#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26148#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26149#[cfg_attr(feature = "ts", derive(TS))]
26150#[cfg_attr(feature = "ts", ts(export))]
26151pub struct SAFETY_ALLOWED_AREA_DATA {
26152    #[doc = "x position 1 / Latitude 1"]
26153    pub p1x: f32,
26154    #[doc = "y position 1 / Longitude 1"]
26155    pub p1y: f32,
26156    #[doc = "z position 1 / Altitude 1"]
26157    pub p1z: f32,
26158    #[doc = "x position 2 / Latitude 2"]
26159    pub p2x: f32,
26160    #[doc = "y position 2 / Longitude 2"]
26161    pub p2y: f32,
26162    #[doc = "z position 2 / Altitude 2"]
26163    pub p2z: f32,
26164    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26165    pub frame: MavFrame,
26166}
26167impl SAFETY_ALLOWED_AREA_DATA {
26168    pub const ENCODED_LEN: usize = 25usize;
26169    pub const DEFAULT: Self = Self {
26170        p1x: 0.0_f32,
26171        p1y: 0.0_f32,
26172        p1z: 0.0_f32,
26173        p2x: 0.0_f32,
26174        p2y: 0.0_f32,
26175        p2z: 0.0_f32,
26176        frame: MavFrame::DEFAULT,
26177    };
26178    #[cfg(feature = "arbitrary")]
26179    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26180        use arbitrary::{Arbitrary, Unstructured};
26181        let mut buf = [0u8; 1024];
26182        rng.fill_bytes(&mut buf);
26183        let mut unstructured = Unstructured::new(&buf);
26184        Self::arbitrary(&mut unstructured).unwrap_or_default()
26185    }
26186}
26187impl Default for SAFETY_ALLOWED_AREA_DATA {
26188    fn default() -> Self {
26189        Self::DEFAULT.clone()
26190    }
26191}
26192impl MessageData for SAFETY_ALLOWED_AREA_DATA {
26193    type Message = MavMessage;
26194    const ID: u32 = 55u32;
26195    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
26196    const EXTRA_CRC: u8 = 3u8;
26197    const ENCODED_LEN: usize = 25usize;
26198    fn deser(
26199        _version: MavlinkVersion,
26200        __input: &[u8],
26201    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26202        let avail_len = __input.len();
26203        let mut payload_buf = [0; Self::ENCODED_LEN];
26204        let mut buf = if avail_len < Self::ENCODED_LEN {
26205            payload_buf[0..avail_len].copy_from_slice(__input);
26206            Bytes::new(&payload_buf)
26207        } else {
26208            Bytes::new(__input)
26209        };
26210        let mut __struct = Self::default();
26211        __struct.p1x = buf.get_f32_le()?;
26212        __struct.p1y = buf.get_f32_le()?;
26213        __struct.p1z = buf.get_f32_le()?;
26214        __struct.p2x = buf.get_f32_le()?;
26215        __struct.p2y = buf.get_f32_le()?;
26216        __struct.p2z = buf.get_f32_le()?;
26217        let tmp = buf.get_u8()?;
26218        __struct.frame =
26219            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26220                enum_type: "MavFrame",
26221                value: tmp as u64,
26222            })?;
26223        Ok(__struct)
26224    }
26225    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26226        let mut __tmp = BytesMut::new(bytes);
26227        #[allow(clippy::absurd_extreme_comparisons)]
26228        #[allow(unused_comparisons)]
26229        if __tmp.remaining() < Self::ENCODED_LEN {
26230            panic!(
26231                "buffer is too small (need {} bytes, but got {})",
26232                Self::ENCODED_LEN,
26233                __tmp.remaining(),
26234            )
26235        }
26236        __tmp.put_f32_le(self.p1x);
26237        __tmp.put_f32_le(self.p1y);
26238        __tmp.put_f32_le(self.p1z);
26239        __tmp.put_f32_le(self.p2x);
26240        __tmp.put_f32_le(self.p2y);
26241        __tmp.put_f32_le(self.p2z);
26242        __tmp.put_u8(self.frame as u8);
26243        if matches!(version, MavlinkVersion::V2) {
26244            let len = __tmp.len();
26245            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26246        } else {
26247            __tmp.len()
26248        }
26249    }
26250}
26251#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
26252#[doc = ""]
26253#[doc = "ID: 54"]
26254#[derive(Debug, Clone, PartialEq)]
26255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26256#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26257#[cfg_attr(feature = "ts", derive(TS))]
26258#[cfg_attr(feature = "ts", ts(export))]
26259pub struct SAFETY_SET_ALLOWED_AREA_DATA {
26260    #[doc = "x position 1 / Latitude 1"]
26261    pub p1x: f32,
26262    #[doc = "y position 1 / Longitude 1"]
26263    pub p1y: f32,
26264    #[doc = "z position 1 / Altitude 1"]
26265    pub p1z: f32,
26266    #[doc = "x position 2 / Latitude 2"]
26267    pub p2x: f32,
26268    #[doc = "y position 2 / Longitude 2"]
26269    pub p2y: f32,
26270    #[doc = "z position 2 / Altitude 2"]
26271    pub p2z: f32,
26272    #[doc = "System ID"]
26273    pub target_system: u8,
26274    #[doc = "Component ID"]
26275    pub target_component: u8,
26276    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26277    pub frame: MavFrame,
26278}
26279impl SAFETY_SET_ALLOWED_AREA_DATA {
26280    pub const ENCODED_LEN: usize = 27usize;
26281    pub const DEFAULT: Self = Self {
26282        p1x: 0.0_f32,
26283        p1y: 0.0_f32,
26284        p1z: 0.0_f32,
26285        p2x: 0.0_f32,
26286        p2y: 0.0_f32,
26287        p2z: 0.0_f32,
26288        target_system: 0_u8,
26289        target_component: 0_u8,
26290        frame: MavFrame::DEFAULT,
26291    };
26292    #[cfg(feature = "arbitrary")]
26293    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26294        use arbitrary::{Arbitrary, Unstructured};
26295        let mut buf = [0u8; 1024];
26296        rng.fill_bytes(&mut buf);
26297        let mut unstructured = Unstructured::new(&buf);
26298        Self::arbitrary(&mut unstructured).unwrap_or_default()
26299    }
26300}
26301impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
26302    fn default() -> Self {
26303        Self::DEFAULT.clone()
26304    }
26305}
26306impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
26307    type Message = MavMessage;
26308    const ID: u32 = 54u32;
26309    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
26310    const EXTRA_CRC: u8 = 15u8;
26311    const ENCODED_LEN: usize = 27usize;
26312    fn deser(
26313        _version: MavlinkVersion,
26314        __input: &[u8],
26315    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26316        let avail_len = __input.len();
26317        let mut payload_buf = [0; Self::ENCODED_LEN];
26318        let mut buf = if avail_len < Self::ENCODED_LEN {
26319            payload_buf[0..avail_len].copy_from_slice(__input);
26320            Bytes::new(&payload_buf)
26321        } else {
26322            Bytes::new(__input)
26323        };
26324        let mut __struct = Self::default();
26325        __struct.p1x = buf.get_f32_le()?;
26326        __struct.p1y = buf.get_f32_le()?;
26327        __struct.p1z = buf.get_f32_le()?;
26328        __struct.p2x = buf.get_f32_le()?;
26329        __struct.p2y = buf.get_f32_le()?;
26330        __struct.p2z = buf.get_f32_le()?;
26331        __struct.target_system = buf.get_u8()?;
26332        __struct.target_component = buf.get_u8()?;
26333        let tmp = buf.get_u8()?;
26334        __struct.frame =
26335            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26336                enum_type: "MavFrame",
26337                value: tmp as u64,
26338            })?;
26339        Ok(__struct)
26340    }
26341    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26342        let mut __tmp = BytesMut::new(bytes);
26343        #[allow(clippy::absurd_extreme_comparisons)]
26344        #[allow(unused_comparisons)]
26345        if __tmp.remaining() < Self::ENCODED_LEN {
26346            panic!(
26347                "buffer is too small (need {} bytes, but got {})",
26348                Self::ENCODED_LEN,
26349                __tmp.remaining(),
26350            )
26351        }
26352        __tmp.put_f32_le(self.p1x);
26353        __tmp.put_f32_le(self.p1y);
26354        __tmp.put_f32_le(self.p1z);
26355        __tmp.put_f32_le(self.p2x);
26356        __tmp.put_f32_le(self.p2y);
26357        __tmp.put_f32_le(self.p2z);
26358        __tmp.put_u8(self.target_system);
26359        __tmp.put_u8(self.target_component);
26360        __tmp.put_u8(self.frame as u8);
26361        if matches!(version, MavlinkVersion::V2) {
26362            let len = __tmp.len();
26363            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26364        } else {
26365            __tmp.len()
26366        }
26367    }
26368}
26369#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
26370#[doc = ""]
26371#[doc = "ID: 26"]
26372#[derive(Debug, Clone, PartialEq)]
26373#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26374#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26375#[cfg_attr(feature = "ts", derive(TS))]
26376#[cfg_attr(feature = "ts", ts(export))]
26377pub struct SCALED_IMU_DATA {
26378    #[doc = "Timestamp (time since system boot)."]
26379    pub time_boot_ms: u32,
26380    #[doc = "X acceleration"]
26381    pub xacc: i16,
26382    #[doc = "Y acceleration"]
26383    pub yacc: i16,
26384    #[doc = "Z acceleration"]
26385    pub zacc: i16,
26386    #[doc = "Angular speed around X axis"]
26387    pub xgyro: i16,
26388    #[doc = "Angular speed around Y axis"]
26389    pub ygyro: i16,
26390    #[doc = "Angular speed around Z axis"]
26391    pub zgyro: i16,
26392    #[doc = "X Magnetic field"]
26393    pub xmag: i16,
26394    #[doc = "Y Magnetic field"]
26395    pub ymag: i16,
26396    #[doc = "Z Magnetic field"]
26397    pub zmag: i16,
26398    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26399    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26400    pub temperature: i16,
26401}
26402impl SCALED_IMU_DATA {
26403    pub const ENCODED_LEN: usize = 24usize;
26404    pub const DEFAULT: Self = Self {
26405        time_boot_ms: 0_u32,
26406        xacc: 0_i16,
26407        yacc: 0_i16,
26408        zacc: 0_i16,
26409        xgyro: 0_i16,
26410        ygyro: 0_i16,
26411        zgyro: 0_i16,
26412        xmag: 0_i16,
26413        ymag: 0_i16,
26414        zmag: 0_i16,
26415        temperature: 0_i16,
26416    };
26417    #[cfg(feature = "arbitrary")]
26418    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26419        use arbitrary::{Arbitrary, Unstructured};
26420        let mut buf = [0u8; 1024];
26421        rng.fill_bytes(&mut buf);
26422        let mut unstructured = Unstructured::new(&buf);
26423        Self::arbitrary(&mut unstructured).unwrap_or_default()
26424    }
26425}
26426impl Default for SCALED_IMU_DATA {
26427    fn default() -> Self {
26428        Self::DEFAULT.clone()
26429    }
26430}
26431impl MessageData for SCALED_IMU_DATA {
26432    type Message = MavMessage;
26433    const ID: u32 = 26u32;
26434    const NAME: &'static str = "SCALED_IMU";
26435    const EXTRA_CRC: u8 = 170u8;
26436    const ENCODED_LEN: usize = 24usize;
26437    fn deser(
26438        _version: MavlinkVersion,
26439        __input: &[u8],
26440    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26441        let avail_len = __input.len();
26442        let mut payload_buf = [0; Self::ENCODED_LEN];
26443        let mut buf = if avail_len < Self::ENCODED_LEN {
26444            payload_buf[0..avail_len].copy_from_slice(__input);
26445            Bytes::new(&payload_buf)
26446        } else {
26447            Bytes::new(__input)
26448        };
26449        let mut __struct = Self::default();
26450        __struct.time_boot_ms = buf.get_u32_le()?;
26451        __struct.xacc = buf.get_i16_le()?;
26452        __struct.yacc = buf.get_i16_le()?;
26453        __struct.zacc = buf.get_i16_le()?;
26454        __struct.xgyro = buf.get_i16_le()?;
26455        __struct.ygyro = buf.get_i16_le()?;
26456        __struct.zgyro = buf.get_i16_le()?;
26457        __struct.xmag = buf.get_i16_le()?;
26458        __struct.ymag = buf.get_i16_le()?;
26459        __struct.zmag = buf.get_i16_le()?;
26460        __struct.temperature = buf.get_i16_le()?;
26461        Ok(__struct)
26462    }
26463    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26464        let mut __tmp = BytesMut::new(bytes);
26465        #[allow(clippy::absurd_extreme_comparisons)]
26466        #[allow(unused_comparisons)]
26467        if __tmp.remaining() < Self::ENCODED_LEN {
26468            panic!(
26469                "buffer is too small (need {} bytes, but got {})",
26470                Self::ENCODED_LEN,
26471                __tmp.remaining(),
26472            )
26473        }
26474        __tmp.put_u32_le(self.time_boot_ms);
26475        __tmp.put_i16_le(self.xacc);
26476        __tmp.put_i16_le(self.yacc);
26477        __tmp.put_i16_le(self.zacc);
26478        __tmp.put_i16_le(self.xgyro);
26479        __tmp.put_i16_le(self.ygyro);
26480        __tmp.put_i16_le(self.zgyro);
26481        __tmp.put_i16_le(self.xmag);
26482        __tmp.put_i16_le(self.ymag);
26483        __tmp.put_i16_le(self.zmag);
26484        if matches!(version, MavlinkVersion::V2) {
26485            __tmp.put_i16_le(self.temperature);
26486            let len = __tmp.len();
26487            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26488        } else {
26489            __tmp.len()
26490        }
26491    }
26492}
26493#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
26494#[doc = ""]
26495#[doc = "ID: 116"]
26496#[derive(Debug, Clone, PartialEq)]
26497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26498#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26499#[cfg_attr(feature = "ts", derive(TS))]
26500#[cfg_attr(feature = "ts", ts(export))]
26501pub struct SCALED_IMU2_DATA {
26502    #[doc = "Timestamp (time since system boot)."]
26503    pub time_boot_ms: u32,
26504    #[doc = "X acceleration"]
26505    pub xacc: i16,
26506    #[doc = "Y acceleration"]
26507    pub yacc: i16,
26508    #[doc = "Z acceleration"]
26509    pub zacc: i16,
26510    #[doc = "Angular speed around X axis"]
26511    pub xgyro: i16,
26512    #[doc = "Angular speed around Y axis"]
26513    pub ygyro: i16,
26514    #[doc = "Angular speed around Z axis"]
26515    pub zgyro: i16,
26516    #[doc = "X Magnetic field"]
26517    pub xmag: i16,
26518    #[doc = "Y Magnetic field"]
26519    pub ymag: i16,
26520    #[doc = "Z Magnetic field"]
26521    pub zmag: i16,
26522    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26523    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26524    pub temperature: i16,
26525}
26526impl SCALED_IMU2_DATA {
26527    pub const ENCODED_LEN: usize = 24usize;
26528    pub const DEFAULT: Self = Self {
26529        time_boot_ms: 0_u32,
26530        xacc: 0_i16,
26531        yacc: 0_i16,
26532        zacc: 0_i16,
26533        xgyro: 0_i16,
26534        ygyro: 0_i16,
26535        zgyro: 0_i16,
26536        xmag: 0_i16,
26537        ymag: 0_i16,
26538        zmag: 0_i16,
26539        temperature: 0_i16,
26540    };
26541    #[cfg(feature = "arbitrary")]
26542    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26543        use arbitrary::{Arbitrary, Unstructured};
26544        let mut buf = [0u8; 1024];
26545        rng.fill_bytes(&mut buf);
26546        let mut unstructured = Unstructured::new(&buf);
26547        Self::arbitrary(&mut unstructured).unwrap_or_default()
26548    }
26549}
26550impl Default for SCALED_IMU2_DATA {
26551    fn default() -> Self {
26552        Self::DEFAULT.clone()
26553    }
26554}
26555impl MessageData for SCALED_IMU2_DATA {
26556    type Message = MavMessage;
26557    const ID: u32 = 116u32;
26558    const NAME: &'static str = "SCALED_IMU2";
26559    const EXTRA_CRC: u8 = 76u8;
26560    const ENCODED_LEN: usize = 24usize;
26561    fn deser(
26562        _version: MavlinkVersion,
26563        __input: &[u8],
26564    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26565        let avail_len = __input.len();
26566        let mut payload_buf = [0; Self::ENCODED_LEN];
26567        let mut buf = if avail_len < Self::ENCODED_LEN {
26568            payload_buf[0..avail_len].copy_from_slice(__input);
26569            Bytes::new(&payload_buf)
26570        } else {
26571            Bytes::new(__input)
26572        };
26573        let mut __struct = Self::default();
26574        __struct.time_boot_ms = buf.get_u32_le()?;
26575        __struct.xacc = buf.get_i16_le()?;
26576        __struct.yacc = buf.get_i16_le()?;
26577        __struct.zacc = buf.get_i16_le()?;
26578        __struct.xgyro = buf.get_i16_le()?;
26579        __struct.ygyro = buf.get_i16_le()?;
26580        __struct.zgyro = buf.get_i16_le()?;
26581        __struct.xmag = buf.get_i16_le()?;
26582        __struct.ymag = buf.get_i16_le()?;
26583        __struct.zmag = buf.get_i16_le()?;
26584        __struct.temperature = buf.get_i16_le()?;
26585        Ok(__struct)
26586    }
26587    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26588        let mut __tmp = BytesMut::new(bytes);
26589        #[allow(clippy::absurd_extreme_comparisons)]
26590        #[allow(unused_comparisons)]
26591        if __tmp.remaining() < Self::ENCODED_LEN {
26592            panic!(
26593                "buffer is too small (need {} bytes, but got {})",
26594                Self::ENCODED_LEN,
26595                __tmp.remaining(),
26596            )
26597        }
26598        __tmp.put_u32_le(self.time_boot_ms);
26599        __tmp.put_i16_le(self.xacc);
26600        __tmp.put_i16_le(self.yacc);
26601        __tmp.put_i16_le(self.zacc);
26602        __tmp.put_i16_le(self.xgyro);
26603        __tmp.put_i16_le(self.ygyro);
26604        __tmp.put_i16_le(self.zgyro);
26605        __tmp.put_i16_le(self.xmag);
26606        __tmp.put_i16_le(self.ymag);
26607        __tmp.put_i16_le(self.zmag);
26608        if matches!(version, MavlinkVersion::V2) {
26609            __tmp.put_i16_le(self.temperature);
26610            let len = __tmp.len();
26611            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26612        } else {
26613            __tmp.len()
26614        }
26615    }
26616}
26617#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
26618#[doc = ""]
26619#[doc = "ID: 129"]
26620#[derive(Debug, Clone, PartialEq)]
26621#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26622#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26623#[cfg_attr(feature = "ts", derive(TS))]
26624#[cfg_attr(feature = "ts", ts(export))]
26625pub struct SCALED_IMU3_DATA {
26626    #[doc = "Timestamp (time since system boot)."]
26627    pub time_boot_ms: u32,
26628    #[doc = "X acceleration"]
26629    pub xacc: i16,
26630    #[doc = "Y acceleration"]
26631    pub yacc: i16,
26632    #[doc = "Z acceleration"]
26633    pub zacc: i16,
26634    #[doc = "Angular speed around X axis"]
26635    pub xgyro: i16,
26636    #[doc = "Angular speed around Y axis"]
26637    pub ygyro: i16,
26638    #[doc = "Angular speed around Z axis"]
26639    pub zgyro: i16,
26640    #[doc = "X Magnetic field"]
26641    pub xmag: i16,
26642    #[doc = "Y Magnetic field"]
26643    pub ymag: i16,
26644    #[doc = "Z Magnetic field"]
26645    pub zmag: i16,
26646    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26647    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26648    pub temperature: i16,
26649}
26650impl SCALED_IMU3_DATA {
26651    pub const ENCODED_LEN: usize = 24usize;
26652    pub const DEFAULT: Self = Self {
26653        time_boot_ms: 0_u32,
26654        xacc: 0_i16,
26655        yacc: 0_i16,
26656        zacc: 0_i16,
26657        xgyro: 0_i16,
26658        ygyro: 0_i16,
26659        zgyro: 0_i16,
26660        xmag: 0_i16,
26661        ymag: 0_i16,
26662        zmag: 0_i16,
26663        temperature: 0_i16,
26664    };
26665    #[cfg(feature = "arbitrary")]
26666    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26667        use arbitrary::{Arbitrary, Unstructured};
26668        let mut buf = [0u8; 1024];
26669        rng.fill_bytes(&mut buf);
26670        let mut unstructured = Unstructured::new(&buf);
26671        Self::arbitrary(&mut unstructured).unwrap_or_default()
26672    }
26673}
26674impl Default for SCALED_IMU3_DATA {
26675    fn default() -> Self {
26676        Self::DEFAULT.clone()
26677    }
26678}
26679impl MessageData for SCALED_IMU3_DATA {
26680    type Message = MavMessage;
26681    const ID: u32 = 129u32;
26682    const NAME: &'static str = "SCALED_IMU3";
26683    const EXTRA_CRC: u8 = 46u8;
26684    const ENCODED_LEN: usize = 24usize;
26685    fn deser(
26686        _version: MavlinkVersion,
26687        __input: &[u8],
26688    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26689        let avail_len = __input.len();
26690        let mut payload_buf = [0; Self::ENCODED_LEN];
26691        let mut buf = if avail_len < Self::ENCODED_LEN {
26692            payload_buf[0..avail_len].copy_from_slice(__input);
26693            Bytes::new(&payload_buf)
26694        } else {
26695            Bytes::new(__input)
26696        };
26697        let mut __struct = Self::default();
26698        __struct.time_boot_ms = buf.get_u32_le()?;
26699        __struct.xacc = buf.get_i16_le()?;
26700        __struct.yacc = buf.get_i16_le()?;
26701        __struct.zacc = buf.get_i16_le()?;
26702        __struct.xgyro = buf.get_i16_le()?;
26703        __struct.ygyro = buf.get_i16_le()?;
26704        __struct.zgyro = buf.get_i16_le()?;
26705        __struct.xmag = buf.get_i16_le()?;
26706        __struct.ymag = buf.get_i16_le()?;
26707        __struct.zmag = buf.get_i16_le()?;
26708        __struct.temperature = buf.get_i16_le()?;
26709        Ok(__struct)
26710    }
26711    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26712        let mut __tmp = BytesMut::new(bytes);
26713        #[allow(clippy::absurd_extreme_comparisons)]
26714        #[allow(unused_comparisons)]
26715        if __tmp.remaining() < Self::ENCODED_LEN {
26716            panic!(
26717                "buffer is too small (need {} bytes, but got {})",
26718                Self::ENCODED_LEN,
26719                __tmp.remaining(),
26720            )
26721        }
26722        __tmp.put_u32_le(self.time_boot_ms);
26723        __tmp.put_i16_le(self.xacc);
26724        __tmp.put_i16_le(self.yacc);
26725        __tmp.put_i16_le(self.zacc);
26726        __tmp.put_i16_le(self.xgyro);
26727        __tmp.put_i16_le(self.ygyro);
26728        __tmp.put_i16_le(self.zgyro);
26729        __tmp.put_i16_le(self.xmag);
26730        __tmp.put_i16_le(self.ymag);
26731        __tmp.put_i16_le(self.zmag);
26732        if matches!(version, MavlinkVersion::V2) {
26733            __tmp.put_i16_le(self.temperature);
26734            let len = __tmp.len();
26735            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26736        } else {
26737            __tmp.len()
26738        }
26739    }
26740}
26741#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
26742#[doc = ""]
26743#[doc = "ID: 29"]
26744#[derive(Debug, Clone, PartialEq)]
26745#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26746#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26747#[cfg_attr(feature = "ts", derive(TS))]
26748#[cfg_attr(feature = "ts", ts(export))]
26749pub struct SCALED_PRESSURE_DATA {
26750    #[doc = "Timestamp (time since system boot)."]
26751    pub time_boot_ms: u32,
26752    #[doc = "Absolute pressure"]
26753    pub press_abs: f32,
26754    #[doc = "Differential pressure 1"]
26755    pub press_diff: f32,
26756    #[doc = "Absolute pressure temperature"]
26757    pub temperature: i16,
26758    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26759    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26760    pub temperature_press_diff: i16,
26761}
26762impl SCALED_PRESSURE_DATA {
26763    pub const ENCODED_LEN: usize = 16usize;
26764    pub const DEFAULT: Self = Self {
26765        time_boot_ms: 0_u32,
26766        press_abs: 0.0_f32,
26767        press_diff: 0.0_f32,
26768        temperature: 0_i16,
26769        temperature_press_diff: 0_i16,
26770    };
26771    #[cfg(feature = "arbitrary")]
26772    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26773        use arbitrary::{Arbitrary, Unstructured};
26774        let mut buf = [0u8; 1024];
26775        rng.fill_bytes(&mut buf);
26776        let mut unstructured = Unstructured::new(&buf);
26777        Self::arbitrary(&mut unstructured).unwrap_or_default()
26778    }
26779}
26780impl Default for SCALED_PRESSURE_DATA {
26781    fn default() -> Self {
26782        Self::DEFAULT.clone()
26783    }
26784}
26785impl MessageData for SCALED_PRESSURE_DATA {
26786    type Message = MavMessage;
26787    const ID: u32 = 29u32;
26788    const NAME: &'static str = "SCALED_PRESSURE";
26789    const EXTRA_CRC: u8 = 115u8;
26790    const ENCODED_LEN: usize = 16usize;
26791    fn deser(
26792        _version: MavlinkVersion,
26793        __input: &[u8],
26794    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26795        let avail_len = __input.len();
26796        let mut payload_buf = [0; Self::ENCODED_LEN];
26797        let mut buf = if avail_len < Self::ENCODED_LEN {
26798            payload_buf[0..avail_len].copy_from_slice(__input);
26799            Bytes::new(&payload_buf)
26800        } else {
26801            Bytes::new(__input)
26802        };
26803        let mut __struct = Self::default();
26804        __struct.time_boot_ms = buf.get_u32_le()?;
26805        __struct.press_abs = buf.get_f32_le()?;
26806        __struct.press_diff = buf.get_f32_le()?;
26807        __struct.temperature = buf.get_i16_le()?;
26808        __struct.temperature_press_diff = buf.get_i16_le()?;
26809        Ok(__struct)
26810    }
26811    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26812        let mut __tmp = BytesMut::new(bytes);
26813        #[allow(clippy::absurd_extreme_comparisons)]
26814        #[allow(unused_comparisons)]
26815        if __tmp.remaining() < Self::ENCODED_LEN {
26816            panic!(
26817                "buffer is too small (need {} bytes, but got {})",
26818                Self::ENCODED_LEN,
26819                __tmp.remaining(),
26820            )
26821        }
26822        __tmp.put_u32_le(self.time_boot_ms);
26823        __tmp.put_f32_le(self.press_abs);
26824        __tmp.put_f32_le(self.press_diff);
26825        __tmp.put_i16_le(self.temperature);
26826        if matches!(version, MavlinkVersion::V2) {
26827            __tmp.put_i16_le(self.temperature_press_diff);
26828            let len = __tmp.len();
26829            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26830        } else {
26831            __tmp.len()
26832        }
26833    }
26834}
26835#[doc = "Barometer readings for 2nd barometer."]
26836#[doc = ""]
26837#[doc = "ID: 137"]
26838#[derive(Debug, Clone, PartialEq)]
26839#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26840#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26841#[cfg_attr(feature = "ts", derive(TS))]
26842#[cfg_attr(feature = "ts", ts(export))]
26843pub struct SCALED_PRESSURE2_DATA {
26844    #[doc = "Timestamp (time since system boot)."]
26845    pub time_boot_ms: u32,
26846    #[doc = "Absolute pressure"]
26847    pub press_abs: f32,
26848    #[doc = "Differential pressure"]
26849    pub press_diff: f32,
26850    #[doc = "Absolute pressure temperature"]
26851    pub temperature: i16,
26852    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26853    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26854    pub temperature_press_diff: i16,
26855}
26856impl SCALED_PRESSURE2_DATA {
26857    pub const ENCODED_LEN: usize = 16usize;
26858    pub const DEFAULT: Self = Self {
26859        time_boot_ms: 0_u32,
26860        press_abs: 0.0_f32,
26861        press_diff: 0.0_f32,
26862        temperature: 0_i16,
26863        temperature_press_diff: 0_i16,
26864    };
26865    #[cfg(feature = "arbitrary")]
26866    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26867        use arbitrary::{Arbitrary, Unstructured};
26868        let mut buf = [0u8; 1024];
26869        rng.fill_bytes(&mut buf);
26870        let mut unstructured = Unstructured::new(&buf);
26871        Self::arbitrary(&mut unstructured).unwrap_or_default()
26872    }
26873}
26874impl Default for SCALED_PRESSURE2_DATA {
26875    fn default() -> Self {
26876        Self::DEFAULT.clone()
26877    }
26878}
26879impl MessageData for SCALED_PRESSURE2_DATA {
26880    type Message = MavMessage;
26881    const ID: u32 = 137u32;
26882    const NAME: &'static str = "SCALED_PRESSURE2";
26883    const EXTRA_CRC: u8 = 195u8;
26884    const ENCODED_LEN: usize = 16usize;
26885    fn deser(
26886        _version: MavlinkVersion,
26887        __input: &[u8],
26888    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26889        let avail_len = __input.len();
26890        let mut payload_buf = [0; Self::ENCODED_LEN];
26891        let mut buf = if avail_len < Self::ENCODED_LEN {
26892            payload_buf[0..avail_len].copy_from_slice(__input);
26893            Bytes::new(&payload_buf)
26894        } else {
26895            Bytes::new(__input)
26896        };
26897        let mut __struct = Self::default();
26898        __struct.time_boot_ms = buf.get_u32_le()?;
26899        __struct.press_abs = buf.get_f32_le()?;
26900        __struct.press_diff = buf.get_f32_le()?;
26901        __struct.temperature = buf.get_i16_le()?;
26902        __struct.temperature_press_diff = buf.get_i16_le()?;
26903        Ok(__struct)
26904    }
26905    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26906        let mut __tmp = BytesMut::new(bytes);
26907        #[allow(clippy::absurd_extreme_comparisons)]
26908        #[allow(unused_comparisons)]
26909        if __tmp.remaining() < Self::ENCODED_LEN {
26910            panic!(
26911                "buffer is too small (need {} bytes, but got {})",
26912                Self::ENCODED_LEN,
26913                __tmp.remaining(),
26914            )
26915        }
26916        __tmp.put_u32_le(self.time_boot_ms);
26917        __tmp.put_f32_le(self.press_abs);
26918        __tmp.put_f32_le(self.press_diff);
26919        __tmp.put_i16_le(self.temperature);
26920        if matches!(version, MavlinkVersion::V2) {
26921            __tmp.put_i16_le(self.temperature_press_diff);
26922            let len = __tmp.len();
26923            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26924        } else {
26925            __tmp.len()
26926        }
26927    }
26928}
26929#[doc = "Barometer readings for 3rd barometer."]
26930#[doc = ""]
26931#[doc = "ID: 143"]
26932#[derive(Debug, Clone, PartialEq)]
26933#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26934#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26935#[cfg_attr(feature = "ts", derive(TS))]
26936#[cfg_attr(feature = "ts", ts(export))]
26937pub struct SCALED_PRESSURE3_DATA {
26938    #[doc = "Timestamp (time since system boot)."]
26939    pub time_boot_ms: u32,
26940    #[doc = "Absolute pressure"]
26941    pub press_abs: f32,
26942    #[doc = "Differential pressure"]
26943    pub press_diff: f32,
26944    #[doc = "Absolute pressure temperature"]
26945    pub temperature: i16,
26946    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26947    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26948    pub temperature_press_diff: i16,
26949}
26950impl SCALED_PRESSURE3_DATA {
26951    pub const ENCODED_LEN: usize = 16usize;
26952    pub const DEFAULT: Self = Self {
26953        time_boot_ms: 0_u32,
26954        press_abs: 0.0_f32,
26955        press_diff: 0.0_f32,
26956        temperature: 0_i16,
26957        temperature_press_diff: 0_i16,
26958    };
26959    #[cfg(feature = "arbitrary")]
26960    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26961        use arbitrary::{Arbitrary, Unstructured};
26962        let mut buf = [0u8; 1024];
26963        rng.fill_bytes(&mut buf);
26964        let mut unstructured = Unstructured::new(&buf);
26965        Self::arbitrary(&mut unstructured).unwrap_or_default()
26966    }
26967}
26968impl Default for SCALED_PRESSURE3_DATA {
26969    fn default() -> Self {
26970        Self::DEFAULT.clone()
26971    }
26972}
26973impl MessageData for SCALED_PRESSURE3_DATA {
26974    type Message = MavMessage;
26975    const ID: u32 = 143u32;
26976    const NAME: &'static str = "SCALED_PRESSURE3";
26977    const EXTRA_CRC: u8 = 131u8;
26978    const ENCODED_LEN: usize = 16usize;
26979    fn deser(
26980        _version: MavlinkVersion,
26981        __input: &[u8],
26982    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26983        let avail_len = __input.len();
26984        let mut payload_buf = [0; Self::ENCODED_LEN];
26985        let mut buf = if avail_len < Self::ENCODED_LEN {
26986            payload_buf[0..avail_len].copy_from_slice(__input);
26987            Bytes::new(&payload_buf)
26988        } else {
26989            Bytes::new(__input)
26990        };
26991        let mut __struct = Self::default();
26992        __struct.time_boot_ms = buf.get_u32_le()?;
26993        __struct.press_abs = buf.get_f32_le()?;
26994        __struct.press_diff = buf.get_f32_le()?;
26995        __struct.temperature = buf.get_i16_le()?;
26996        __struct.temperature_press_diff = buf.get_i16_le()?;
26997        Ok(__struct)
26998    }
26999    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27000        let mut __tmp = BytesMut::new(bytes);
27001        #[allow(clippy::absurd_extreme_comparisons)]
27002        #[allow(unused_comparisons)]
27003        if __tmp.remaining() < Self::ENCODED_LEN {
27004            panic!(
27005                "buffer is too small (need {} bytes, but got {})",
27006                Self::ENCODED_LEN,
27007                __tmp.remaining(),
27008            )
27009        }
27010        __tmp.put_u32_le(self.time_boot_ms);
27011        __tmp.put_f32_le(self.press_abs);
27012        __tmp.put_f32_le(self.press_diff);
27013        __tmp.put_i16_le(self.temperature);
27014        if matches!(version, MavlinkVersion::V2) {
27015            __tmp.put_i16_le(self.temperature_press_diff);
27016            let len = __tmp.len();
27017            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27018        } else {
27019            __tmp.len()
27020        }
27021    }
27022}
27023#[doc = "This message is emitted as response to SCRIPT_REQUEST_LIST by the MAV to get the number of mission scripts."]
27024#[doc = ""]
27025#[doc = "ID: 183"]
27026#[derive(Debug, Clone, PartialEq)]
27027#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27028#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27029#[cfg_attr(feature = "ts", derive(TS))]
27030#[cfg_attr(feature = "ts", ts(export))]
27031pub struct SCRIPT_COUNT_DATA {
27032    #[doc = "Number of script items in the sequence"]
27033    pub count: u16,
27034    #[doc = "System ID"]
27035    pub target_system: u8,
27036    #[doc = "Component ID"]
27037    pub target_component: u8,
27038}
27039impl SCRIPT_COUNT_DATA {
27040    pub const ENCODED_LEN: usize = 4usize;
27041    pub const DEFAULT: Self = Self {
27042        count: 0_u16,
27043        target_system: 0_u8,
27044        target_component: 0_u8,
27045    };
27046    #[cfg(feature = "arbitrary")]
27047    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27048        use arbitrary::{Arbitrary, Unstructured};
27049        let mut buf = [0u8; 1024];
27050        rng.fill_bytes(&mut buf);
27051        let mut unstructured = Unstructured::new(&buf);
27052        Self::arbitrary(&mut unstructured).unwrap_or_default()
27053    }
27054}
27055impl Default for SCRIPT_COUNT_DATA {
27056    fn default() -> Self {
27057        Self::DEFAULT.clone()
27058    }
27059}
27060impl MessageData for SCRIPT_COUNT_DATA {
27061    type Message = MavMessage;
27062    const ID: u32 = 183u32;
27063    const NAME: &'static str = "SCRIPT_COUNT";
27064    const EXTRA_CRC: u8 = 186u8;
27065    const ENCODED_LEN: usize = 4usize;
27066    fn deser(
27067        _version: MavlinkVersion,
27068        __input: &[u8],
27069    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27070        let avail_len = __input.len();
27071        let mut payload_buf = [0; Self::ENCODED_LEN];
27072        let mut buf = if avail_len < Self::ENCODED_LEN {
27073            payload_buf[0..avail_len].copy_from_slice(__input);
27074            Bytes::new(&payload_buf)
27075        } else {
27076            Bytes::new(__input)
27077        };
27078        let mut __struct = Self::default();
27079        __struct.count = buf.get_u16_le()?;
27080        __struct.target_system = buf.get_u8()?;
27081        __struct.target_component = buf.get_u8()?;
27082        Ok(__struct)
27083    }
27084    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27085        let mut __tmp = BytesMut::new(bytes);
27086        #[allow(clippy::absurd_extreme_comparisons)]
27087        #[allow(unused_comparisons)]
27088        if __tmp.remaining() < Self::ENCODED_LEN {
27089            panic!(
27090                "buffer is too small (need {} bytes, but got {})",
27091                Self::ENCODED_LEN,
27092                __tmp.remaining(),
27093            )
27094        }
27095        __tmp.put_u16_le(self.count);
27096        __tmp.put_u8(self.target_system);
27097        __tmp.put_u8(self.target_component);
27098        if matches!(version, MavlinkVersion::V2) {
27099            let len = __tmp.len();
27100            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27101        } else {
27102            __tmp.len()
27103        }
27104    }
27105}
27106#[doc = "This message informs about the currently active SCRIPT."]
27107#[doc = ""]
27108#[doc = "ID: 184"]
27109#[derive(Debug, Clone, PartialEq)]
27110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27111#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27112#[cfg_attr(feature = "ts", derive(TS))]
27113#[cfg_attr(feature = "ts", ts(export))]
27114pub struct SCRIPT_CURRENT_DATA {
27115    #[doc = "Active Sequence"]
27116    pub seq: u16,
27117}
27118impl SCRIPT_CURRENT_DATA {
27119    pub const ENCODED_LEN: usize = 2usize;
27120    pub const DEFAULT: Self = Self { seq: 0_u16 };
27121    #[cfg(feature = "arbitrary")]
27122    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27123        use arbitrary::{Arbitrary, Unstructured};
27124        let mut buf = [0u8; 1024];
27125        rng.fill_bytes(&mut buf);
27126        let mut unstructured = Unstructured::new(&buf);
27127        Self::arbitrary(&mut unstructured).unwrap_or_default()
27128    }
27129}
27130impl Default for SCRIPT_CURRENT_DATA {
27131    fn default() -> Self {
27132        Self::DEFAULT.clone()
27133    }
27134}
27135impl MessageData for SCRIPT_CURRENT_DATA {
27136    type Message = MavMessage;
27137    const ID: u32 = 184u32;
27138    const NAME: &'static str = "SCRIPT_CURRENT";
27139    const EXTRA_CRC: u8 = 40u8;
27140    const ENCODED_LEN: usize = 2usize;
27141    fn deser(
27142        _version: MavlinkVersion,
27143        __input: &[u8],
27144    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27145        let avail_len = __input.len();
27146        let mut payload_buf = [0; Self::ENCODED_LEN];
27147        let mut buf = if avail_len < Self::ENCODED_LEN {
27148            payload_buf[0..avail_len].copy_from_slice(__input);
27149            Bytes::new(&payload_buf)
27150        } else {
27151            Bytes::new(__input)
27152        };
27153        let mut __struct = Self::default();
27154        __struct.seq = buf.get_u16_le()?;
27155        Ok(__struct)
27156    }
27157    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27158        let mut __tmp = BytesMut::new(bytes);
27159        #[allow(clippy::absurd_extreme_comparisons)]
27160        #[allow(unused_comparisons)]
27161        if __tmp.remaining() < Self::ENCODED_LEN {
27162            panic!(
27163                "buffer is too small (need {} bytes, but got {})",
27164                Self::ENCODED_LEN,
27165                __tmp.remaining(),
27166            )
27167        }
27168        __tmp.put_u16_le(self.seq);
27169        if matches!(version, MavlinkVersion::V2) {
27170            let len = __tmp.len();
27171            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27172        } else {
27173            __tmp.len()
27174        }
27175    }
27176}
27177#[doc = "Message encoding a mission script item. This message is emitted upon a request for the next script item."]
27178#[doc = ""]
27179#[doc = "ID: 180"]
27180#[derive(Debug, Clone, PartialEq)]
27181#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27182#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27183#[cfg_attr(feature = "ts", derive(TS))]
27184#[cfg_attr(feature = "ts", ts(export))]
27185pub struct SCRIPT_ITEM_DATA {
27186    #[doc = "Sequence"]
27187    pub seq: u16,
27188    #[doc = "System ID"]
27189    pub target_system: u8,
27190    #[doc = "Component ID"]
27191    pub target_component: u8,
27192    #[doc = "The name of the mission script, NULL terminated."]
27193    #[cfg_attr(feature = "ts", ts(type = "string"))]
27194    pub name: CharArray<50>,
27195}
27196impl SCRIPT_ITEM_DATA {
27197    pub const ENCODED_LEN: usize = 54usize;
27198    pub const DEFAULT: Self = Self {
27199        seq: 0_u16,
27200        target_system: 0_u8,
27201        target_component: 0_u8,
27202        name: CharArray::new([0_u8; 50usize]),
27203    };
27204    #[cfg(feature = "arbitrary")]
27205    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27206        use arbitrary::{Arbitrary, Unstructured};
27207        let mut buf = [0u8; 1024];
27208        rng.fill_bytes(&mut buf);
27209        let mut unstructured = Unstructured::new(&buf);
27210        Self::arbitrary(&mut unstructured).unwrap_or_default()
27211    }
27212}
27213impl Default for SCRIPT_ITEM_DATA {
27214    fn default() -> Self {
27215        Self::DEFAULT.clone()
27216    }
27217}
27218impl MessageData for SCRIPT_ITEM_DATA {
27219    type Message = MavMessage;
27220    const ID: u32 = 180u32;
27221    const NAME: &'static str = "SCRIPT_ITEM";
27222    const EXTRA_CRC: u8 = 231u8;
27223    const ENCODED_LEN: usize = 54usize;
27224    fn deser(
27225        _version: MavlinkVersion,
27226        __input: &[u8],
27227    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27228        let avail_len = __input.len();
27229        let mut payload_buf = [0; Self::ENCODED_LEN];
27230        let mut buf = if avail_len < Self::ENCODED_LEN {
27231            payload_buf[0..avail_len].copy_from_slice(__input);
27232            Bytes::new(&payload_buf)
27233        } else {
27234            Bytes::new(__input)
27235        };
27236        let mut __struct = Self::default();
27237        __struct.seq = buf.get_u16_le()?;
27238        __struct.target_system = buf.get_u8()?;
27239        __struct.target_component = buf.get_u8()?;
27240        let mut tmp = [0_u8; 50usize];
27241        for v in &mut tmp {
27242            *v = buf.get_u8()?;
27243        }
27244        __struct.name = CharArray::new(tmp);
27245        Ok(__struct)
27246    }
27247    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27248        let mut __tmp = BytesMut::new(bytes);
27249        #[allow(clippy::absurd_extreme_comparisons)]
27250        #[allow(unused_comparisons)]
27251        if __tmp.remaining() < Self::ENCODED_LEN {
27252            panic!(
27253                "buffer is too small (need {} bytes, but got {})",
27254                Self::ENCODED_LEN,
27255                __tmp.remaining(),
27256            )
27257        }
27258        __tmp.put_u16_le(self.seq);
27259        __tmp.put_u8(self.target_system);
27260        __tmp.put_u8(self.target_component);
27261        for val in &self.name {
27262            __tmp.put_u8(*val);
27263        }
27264        if matches!(version, MavlinkVersion::V2) {
27265            let len = __tmp.len();
27266            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27267        } else {
27268            __tmp.len()
27269        }
27270    }
27271}
27272#[doc = "Request script item with the sequence number seq. The response of the system to this message should be a SCRIPT_ITEM message."]
27273#[doc = ""]
27274#[doc = "ID: 181"]
27275#[derive(Debug, Clone, PartialEq)]
27276#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27277#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27278#[cfg_attr(feature = "ts", derive(TS))]
27279#[cfg_attr(feature = "ts", ts(export))]
27280pub struct SCRIPT_REQUEST_DATA {
27281    #[doc = "Sequence"]
27282    pub seq: u16,
27283    #[doc = "System ID"]
27284    pub target_system: u8,
27285    #[doc = "Component ID"]
27286    pub target_component: u8,
27287}
27288impl SCRIPT_REQUEST_DATA {
27289    pub const ENCODED_LEN: usize = 4usize;
27290    pub const DEFAULT: Self = Self {
27291        seq: 0_u16,
27292        target_system: 0_u8,
27293        target_component: 0_u8,
27294    };
27295    #[cfg(feature = "arbitrary")]
27296    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27297        use arbitrary::{Arbitrary, Unstructured};
27298        let mut buf = [0u8; 1024];
27299        rng.fill_bytes(&mut buf);
27300        let mut unstructured = Unstructured::new(&buf);
27301        Self::arbitrary(&mut unstructured).unwrap_or_default()
27302    }
27303}
27304impl Default for SCRIPT_REQUEST_DATA {
27305    fn default() -> Self {
27306        Self::DEFAULT.clone()
27307    }
27308}
27309impl MessageData for SCRIPT_REQUEST_DATA {
27310    type Message = MavMessage;
27311    const ID: u32 = 181u32;
27312    const NAME: &'static str = "SCRIPT_REQUEST";
27313    const EXTRA_CRC: u8 = 129u8;
27314    const ENCODED_LEN: usize = 4usize;
27315    fn deser(
27316        _version: MavlinkVersion,
27317        __input: &[u8],
27318    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27319        let avail_len = __input.len();
27320        let mut payload_buf = [0; Self::ENCODED_LEN];
27321        let mut buf = if avail_len < Self::ENCODED_LEN {
27322            payload_buf[0..avail_len].copy_from_slice(__input);
27323            Bytes::new(&payload_buf)
27324        } else {
27325            Bytes::new(__input)
27326        };
27327        let mut __struct = Self::default();
27328        __struct.seq = buf.get_u16_le()?;
27329        __struct.target_system = buf.get_u8()?;
27330        __struct.target_component = buf.get_u8()?;
27331        Ok(__struct)
27332    }
27333    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27334        let mut __tmp = BytesMut::new(bytes);
27335        #[allow(clippy::absurd_extreme_comparisons)]
27336        #[allow(unused_comparisons)]
27337        if __tmp.remaining() < Self::ENCODED_LEN {
27338            panic!(
27339                "buffer is too small (need {} bytes, but got {})",
27340                Self::ENCODED_LEN,
27341                __tmp.remaining(),
27342            )
27343        }
27344        __tmp.put_u16_le(self.seq);
27345        __tmp.put_u8(self.target_system);
27346        __tmp.put_u8(self.target_component);
27347        if matches!(version, MavlinkVersion::V2) {
27348            let len = __tmp.len();
27349            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27350        } else {
27351            __tmp.len()
27352        }
27353    }
27354}
27355#[doc = "Request the overall list of mission items from the system/component."]
27356#[doc = ""]
27357#[doc = "ID: 182"]
27358#[derive(Debug, Clone, PartialEq)]
27359#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27360#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27361#[cfg_attr(feature = "ts", derive(TS))]
27362#[cfg_attr(feature = "ts", ts(export))]
27363pub struct SCRIPT_REQUEST_LIST_DATA {
27364    #[doc = "System ID"]
27365    pub target_system: u8,
27366    #[doc = "Component ID"]
27367    pub target_component: u8,
27368}
27369impl SCRIPT_REQUEST_LIST_DATA {
27370    pub const ENCODED_LEN: usize = 2usize;
27371    pub const DEFAULT: Self = Self {
27372        target_system: 0_u8,
27373        target_component: 0_u8,
27374    };
27375    #[cfg(feature = "arbitrary")]
27376    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27377        use arbitrary::{Arbitrary, Unstructured};
27378        let mut buf = [0u8; 1024];
27379        rng.fill_bytes(&mut buf);
27380        let mut unstructured = Unstructured::new(&buf);
27381        Self::arbitrary(&mut unstructured).unwrap_or_default()
27382    }
27383}
27384impl Default for SCRIPT_REQUEST_LIST_DATA {
27385    fn default() -> Self {
27386        Self::DEFAULT.clone()
27387    }
27388}
27389impl MessageData for SCRIPT_REQUEST_LIST_DATA {
27390    type Message = MavMessage;
27391    const ID: u32 = 182u32;
27392    const NAME: &'static str = "SCRIPT_REQUEST_LIST";
27393    const EXTRA_CRC: u8 = 115u8;
27394    const ENCODED_LEN: usize = 2usize;
27395    fn deser(
27396        _version: MavlinkVersion,
27397        __input: &[u8],
27398    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27399        let avail_len = __input.len();
27400        let mut payload_buf = [0; Self::ENCODED_LEN];
27401        let mut buf = if avail_len < Self::ENCODED_LEN {
27402            payload_buf[0..avail_len].copy_from_slice(__input);
27403            Bytes::new(&payload_buf)
27404        } else {
27405            Bytes::new(__input)
27406        };
27407        let mut __struct = Self::default();
27408        __struct.target_system = buf.get_u8()?;
27409        __struct.target_component = buf.get_u8()?;
27410        Ok(__struct)
27411    }
27412    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27413        let mut __tmp = BytesMut::new(bytes);
27414        #[allow(clippy::absurd_extreme_comparisons)]
27415        #[allow(unused_comparisons)]
27416        if __tmp.remaining() < Self::ENCODED_LEN {
27417            panic!(
27418                "buffer is too small (need {} bytes, but got {})",
27419                Self::ENCODED_LEN,
27420                __tmp.remaining(),
27421            )
27422        }
27423        __tmp.put_u8(self.target_system);
27424        __tmp.put_u8(self.target_component);
27425        if matches!(version, MavlinkVersion::V2) {
27426            let len = __tmp.len();
27427            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27428        } else {
27429            __tmp.len()
27430        }
27431    }
27432}
27433#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
27434#[doc = ""]
27435#[doc = "ID: 126"]
27436#[derive(Debug, Clone, PartialEq)]
27437#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27438#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27439#[cfg_attr(feature = "ts", derive(TS))]
27440#[cfg_attr(feature = "ts", ts(export))]
27441pub struct SERIAL_CONTROL_DATA {
27442    #[doc = "Baudrate of transfer. Zero means no change."]
27443    pub baudrate: u32,
27444    #[doc = "Timeout for reply data"]
27445    pub timeout: u16,
27446    #[doc = "Serial control device type."]
27447    pub device: SerialControlDev,
27448    #[doc = "Bitmap of serial control flags."]
27449    pub flags: SerialControlFlag,
27450    #[doc = "how many bytes in this transfer"]
27451    pub count: u8,
27452    #[doc = "serial data"]
27453    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27454    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27455    pub data: [u8; 70],
27456    #[doc = "System ID"]
27457    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27458    pub target_system: u8,
27459    #[doc = "Component ID"]
27460    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27461    pub target_component: u8,
27462}
27463impl SERIAL_CONTROL_DATA {
27464    pub const ENCODED_LEN: usize = 81usize;
27465    pub const DEFAULT: Self = Self {
27466        baudrate: 0_u32,
27467        timeout: 0_u16,
27468        device: SerialControlDev::DEFAULT,
27469        flags: SerialControlFlag::DEFAULT,
27470        count: 0_u8,
27471        data: [0_u8; 70usize],
27472        target_system: 0_u8,
27473        target_component: 0_u8,
27474    };
27475    #[cfg(feature = "arbitrary")]
27476    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27477        use arbitrary::{Arbitrary, Unstructured};
27478        let mut buf = [0u8; 1024];
27479        rng.fill_bytes(&mut buf);
27480        let mut unstructured = Unstructured::new(&buf);
27481        Self::arbitrary(&mut unstructured).unwrap_or_default()
27482    }
27483}
27484impl Default for SERIAL_CONTROL_DATA {
27485    fn default() -> Self {
27486        Self::DEFAULT.clone()
27487    }
27488}
27489impl MessageData for SERIAL_CONTROL_DATA {
27490    type Message = MavMessage;
27491    const ID: u32 = 126u32;
27492    const NAME: &'static str = "SERIAL_CONTROL";
27493    const EXTRA_CRC: u8 = 220u8;
27494    const ENCODED_LEN: usize = 81usize;
27495    fn deser(
27496        _version: MavlinkVersion,
27497        __input: &[u8],
27498    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27499        let avail_len = __input.len();
27500        let mut payload_buf = [0; Self::ENCODED_LEN];
27501        let mut buf = if avail_len < Self::ENCODED_LEN {
27502            payload_buf[0..avail_len].copy_from_slice(__input);
27503            Bytes::new(&payload_buf)
27504        } else {
27505            Bytes::new(__input)
27506        };
27507        let mut __struct = Self::default();
27508        __struct.baudrate = buf.get_u32_le()?;
27509        __struct.timeout = buf.get_u16_le()?;
27510        let tmp = buf.get_u8()?;
27511        __struct.device =
27512            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27513                enum_type: "SerialControlDev",
27514                value: tmp as u64,
27515            })?;
27516        let tmp = buf.get_u8()?;
27517        __struct.flags = SerialControlFlag::from_bits(tmp as <SerialControlFlag as Flags>::Bits)
27518            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27519                flag_type: "SerialControlFlag",
27520                value: tmp as u64,
27521            })?;
27522        __struct.count = buf.get_u8()?;
27523        for v in &mut __struct.data {
27524            let val = buf.get_u8()?;
27525            *v = val;
27526        }
27527        __struct.target_system = buf.get_u8()?;
27528        __struct.target_component = buf.get_u8()?;
27529        Ok(__struct)
27530    }
27531    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27532        let mut __tmp = BytesMut::new(bytes);
27533        #[allow(clippy::absurd_extreme_comparisons)]
27534        #[allow(unused_comparisons)]
27535        if __tmp.remaining() < Self::ENCODED_LEN {
27536            panic!(
27537                "buffer is too small (need {} bytes, but got {})",
27538                Self::ENCODED_LEN,
27539                __tmp.remaining(),
27540            )
27541        }
27542        __tmp.put_u32_le(self.baudrate);
27543        __tmp.put_u16_le(self.timeout);
27544        __tmp.put_u8(self.device as u8);
27545        __tmp.put_u8(self.flags.bits() as u8);
27546        __tmp.put_u8(self.count);
27547        for val in &self.data {
27548            __tmp.put_u8(*val);
27549        }
27550        if matches!(version, MavlinkVersion::V2) {
27551            __tmp.put_u8(self.target_system);
27552            __tmp.put_u8(self.target_component);
27553            let len = __tmp.len();
27554            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27555        } else {
27556            __tmp.len()
27557        }
27558    }
27559}
27560#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
27561#[doc = ""]
27562#[doc = "ID: 36"]
27563#[derive(Debug, Clone, PartialEq)]
27564#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27565#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27566#[cfg_attr(feature = "ts", derive(TS))]
27567#[cfg_attr(feature = "ts", ts(export))]
27568pub struct SERVO_OUTPUT_RAW_DATA {
27569    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27570    pub time_usec: u32,
27571    #[doc = "Servo output 1 value"]
27572    pub servo1_raw: u16,
27573    #[doc = "Servo output 2 value"]
27574    pub servo2_raw: u16,
27575    #[doc = "Servo output 3 value"]
27576    pub servo3_raw: u16,
27577    #[doc = "Servo output 4 value"]
27578    pub servo4_raw: u16,
27579    #[doc = "Servo output 5 value"]
27580    pub servo5_raw: u16,
27581    #[doc = "Servo output 6 value"]
27582    pub servo6_raw: u16,
27583    #[doc = "Servo output 7 value"]
27584    pub servo7_raw: u16,
27585    #[doc = "Servo output 8 value"]
27586    pub servo8_raw: u16,
27587    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
27588    pub port: u8,
27589    #[doc = "Servo output 9 value"]
27590    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27591    pub servo9_raw: u16,
27592    #[doc = "Servo output 10 value"]
27593    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27594    pub servo10_raw: u16,
27595    #[doc = "Servo output 11 value"]
27596    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27597    pub servo11_raw: u16,
27598    #[doc = "Servo output 12 value"]
27599    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27600    pub servo12_raw: u16,
27601    #[doc = "Servo output 13 value"]
27602    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27603    pub servo13_raw: u16,
27604    #[doc = "Servo output 14 value"]
27605    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27606    pub servo14_raw: u16,
27607    #[doc = "Servo output 15 value"]
27608    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27609    pub servo15_raw: u16,
27610    #[doc = "Servo output 16 value"]
27611    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27612    pub servo16_raw: u16,
27613}
27614impl SERVO_OUTPUT_RAW_DATA {
27615    pub const ENCODED_LEN: usize = 37usize;
27616    pub const DEFAULT: Self = Self {
27617        time_usec: 0_u32,
27618        servo1_raw: 0_u16,
27619        servo2_raw: 0_u16,
27620        servo3_raw: 0_u16,
27621        servo4_raw: 0_u16,
27622        servo5_raw: 0_u16,
27623        servo6_raw: 0_u16,
27624        servo7_raw: 0_u16,
27625        servo8_raw: 0_u16,
27626        port: 0_u8,
27627        servo9_raw: 0_u16,
27628        servo10_raw: 0_u16,
27629        servo11_raw: 0_u16,
27630        servo12_raw: 0_u16,
27631        servo13_raw: 0_u16,
27632        servo14_raw: 0_u16,
27633        servo15_raw: 0_u16,
27634        servo16_raw: 0_u16,
27635    };
27636    #[cfg(feature = "arbitrary")]
27637    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27638        use arbitrary::{Arbitrary, Unstructured};
27639        let mut buf = [0u8; 1024];
27640        rng.fill_bytes(&mut buf);
27641        let mut unstructured = Unstructured::new(&buf);
27642        Self::arbitrary(&mut unstructured).unwrap_or_default()
27643    }
27644}
27645impl Default for SERVO_OUTPUT_RAW_DATA {
27646    fn default() -> Self {
27647        Self::DEFAULT.clone()
27648    }
27649}
27650impl MessageData for SERVO_OUTPUT_RAW_DATA {
27651    type Message = MavMessage;
27652    const ID: u32 = 36u32;
27653    const NAME: &'static str = "SERVO_OUTPUT_RAW";
27654    const EXTRA_CRC: u8 = 222u8;
27655    const ENCODED_LEN: usize = 37usize;
27656    fn deser(
27657        _version: MavlinkVersion,
27658        __input: &[u8],
27659    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27660        let avail_len = __input.len();
27661        let mut payload_buf = [0; Self::ENCODED_LEN];
27662        let mut buf = if avail_len < Self::ENCODED_LEN {
27663            payload_buf[0..avail_len].copy_from_slice(__input);
27664            Bytes::new(&payload_buf)
27665        } else {
27666            Bytes::new(__input)
27667        };
27668        let mut __struct = Self::default();
27669        __struct.time_usec = buf.get_u32_le()?;
27670        __struct.servo1_raw = buf.get_u16_le()?;
27671        __struct.servo2_raw = buf.get_u16_le()?;
27672        __struct.servo3_raw = buf.get_u16_le()?;
27673        __struct.servo4_raw = buf.get_u16_le()?;
27674        __struct.servo5_raw = buf.get_u16_le()?;
27675        __struct.servo6_raw = buf.get_u16_le()?;
27676        __struct.servo7_raw = buf.get_u16_le()?;
27677        __struct.servo8_raw = buf.get_u16_le()?;
27678        __struct.port = buf.get_u8()?;
27679        __struct.servo9_raw = buf.get_u16_le()?;
27680        __struct.servo10_raw = buf.get_u16_le()?;
27681        __struct.servo11_raw = buf.get_u16_le()?;
27682        __struct.servo12_raw = buf.get_u16_le()?;
27683        __struct.servo13_raw = buf.get_u16_le()?;
27684        __struct.servo14_raw = buf.get_u16_le()?;
27685        __struct.servo15_raw = buf.get_u16_le()?;
27686        __struct.servo16_raw = buf.get_u16_le()?;
27687        Ok(__struct)
27688    }
27689    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27690        let mut __tmp = BytesMut::new(bytes);
27691        #[allow(clippy::absurd_extreme_comparisons)]
27692        #[allow(unused_comparisons)]
27693        if __tmp.remaining() < Self::ENCODED_LEN {
27694            panic!(
27695                "buffer is too small (need {} bytes, but got {})",
27696                Self::ENCODED_LEN,
27697                __tmp.remaining(),
27698            )
27699        }
27700        __tmp.put_u32_le(self.time_usec);
27701        __tmp.put_u16_le(self.servo1_raw);
27702        __tmp.put_u16_le(self.servo2_raw);
27703        __tmp.put_u16_le(self.servo3_raw);
27704        __tmp.put_u16_le(self.servo4_raw);
27705        __tmp.put_u16_le(self.servo5_raw);
27706        __tmp.put_u16_le(self.servo6_raw);
27707        __tmp.put_u16_le(self.servo7_raw);
27708        __tmp.put_u16_le(self.servo8_raw);
27709        __tmp.put_u8(self.port);
27710        if matches!(version, MavlinkVersion::V2) {
27711            __tmp.put_u16_le(self.servo9_raw);
27712            __tmp.put_u16_le(self.servo10_raw);
27713            __tmp.put_u16_le(self.servo11_raw);
27714            __tmp.put_u16_le(self.servo12_raw);
27715            __tmp.put_u16_le(self.servo13_raw);
27716            __tmp.put_u16_le(self.servo14_raw);
27717            __tmp.put_u16_le(self.servo15_raw);
27718            __tmp.put_u16_le(self.servo16_raw);
27719            let len = __tmp.len();
27720            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27721        } else {
27722            __tmp.len()
27723        }
27724    }
27725}
27726#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
27727#[doc = ""]
27728#[doc = "ID: 256"]
27729#[derive(Debug, Clone, PartialEq)]
27730#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27732#[cfg_attr(feature = "ts", derive(TS))]
27733#[cfg_attr(feature = "ts", ts(export))]
27734pub struct SETUP_SIGNING_DATA {
27735    #[doc = "initial timestamp"]
27736    pub initial_timestamp: u64,
27737    #[doc = "system id of the target"]
27738    pub target_system: u8,
27739    #[doc = "component ID of the target"]
27740    pub target_component: u8,
27741    #[doc = "signing key"]
27742    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27743    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27744    pub secret_key: [u8; 32],
27745}
27746impl SETUP_SIGNING_DATA {
27747    pub const ENCODED_LEN: usize = 42usize;
27748    pub const DEFAULT: Self = Self {
27749        initial_timestamp: 0_u64,
27750        target_system: 0_u8,
27751        target_component: 0_u8,
27752        secret_key: [0_u8; 32usize],
27753    };
27754    #[cfg(feature = "arbitrary")]
27755    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27756        use arbitrary::{Arbitrary, Unstructured};
27757        let mut buf = [0u8; 1024];
27758        rng.fill_bytes(&mut buf);
27759        let mut unstructured = Unstructured::new(&buf);
27760        Self::arbitrary(&mut unstructured).unwrap_or_default()
27761    }
27762}
27763impl Default for SETUP_SIGNING_DATA {
27764    fn default() -> Self {
27765        Self::DEFAULT.clone()
27766    }
27767}
27768impl MessageData for SETUP_SIGNING_DATA {
27769    type Message = MavMessage;
27770    const ID: u32 = 256u32;
27771    const NAME: &'static str = "SETUP_SIGNING";
27772    const EXTRA_CRC: u8 = 71u8;
27773    const ENCODED_LEN: usize = 42usize;
27774    fn deser(
27775        _version: MavlinkVersion,
27776        __input: &[u8],
27777    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27778        let avail_len = __input.len();
27779        let mut payload_buf = [0; Self::ENCODED_LEN];
27780        let mut buf = if avail_len < Self::ENCODED_LEN {
27781            payload_buf[0..avail_len].copy_from_slice(__input);
27782            Bytes::new(&payload_buf)
27783        } else {
27784            Bytes::new(__input)
27785        };
27786        let mut __struct = Self::default();
27787        __struct.initial_timestamp = buf.get_u64_le()?;
27788        __struct.target_system = buf.get_u8()?;
27789        __struct.target_component = buf.get_u8()?;
27790        for v in &mut __struct.secret_key {
27791            let val = buf.get_u8()?;
27792            *v = val;
27793        }
27794        Ok(__struct)
27795    }
27796    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27797        let mut __tmp = BytesMut::new(bytes);
27798        #[allow(clippy::absurd_extreme_comparisons)]
27799        #[allow(unused_comparisons)]
27800        if __tmp.remaining() < Self::ENCODED_LEN {
27801            panic!(
27802                "buffer is too small (need {} bytes, but got {})",
27803                Self::ENCODED_LEN,
27804                __tmp.remaining(),
27805            )
27806        }
27807        __tmp.put_u64_le(self.initial_timestamp);
27808        __tmp.put_u8(self.target_system);
27809        __tmp.put_u8(self.target_component);
27810        for val in &self.secret_key {
27811            __tmp.put_u8(*val);
27812        }
27813        if matches!(version, MavlinkVersion::V2) {
27814            let len = __tmp.len();
27815            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27816        } else {
27817            __tmp.len()
27818        }
27819    }
27820}
27821#[doc = "Set the vehicle attitude and body angular rates."]
27822#[doc = ""]
27823#[doc = "ID: 139"]
27824#[derive(Debug, Clone, PartialEq)]
27825#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27826#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27827#[cfg_attr(feature = "ts", derive(TS))]
27828#[cfg_attr(feature = "ts", ts(export))]
27829pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
27830    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27831    pub time_usec: u64,
27832    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
27833    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27834    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27835    pub controls: [f32; 8],
27836    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
27837    pub group_mlx: u8,
27838    #[doc = "System ID"]
27839    pub target_system: u8,
27840    #[doc = "Component ID"]
27841    pub target_component: u8,
27842}
27843impl SET_ACTUATOR_CONTROL_TARGET_DATA {
27844    pub const ENCODED_LEN: usize = 43usize;
27845    pub const DEFAULT: Self = Self {
27846        time_usec: 0_u64,
27847        controls: [0.0_f32; 8usize],
27848        group_mlx: 0_u8,
27849        target_system: 0_u8,
27850        target_component: 0_u8,
27851    };
27852    #[cfg(feature = "arbitrary")]
27853    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27854        use arbitrary::{Arbitrary, Unstructured};
27855        let mut buf = [0u8; 1024];
27856        rng.fill_bytes(&mut buf);
27857        let mut unstructured = Unstructured::new(&buf);
27858        Self::arbitrary(&mut unstructured).unwrap_or_default()
27859    }
27860}
27861impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
27862    fn default() -> Self {
27863        Self::DEFAULT.clone()
27864    }
27865}
27866impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
27867    type Message = MavMessage;
27868    const ID: u32 = 139u32;
27869    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
27870    const EXTRA_CRC: u8 = 168u8;
27871    const ENCODED_LEN: usize = 43usize;
27872    fn deser(
27873        _version: MavlinkVersion,
27874        __input: &[u8],
27875    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27876        let avail_len = __input.len();
27877        let mut payload_buf = [0; Self::ENCODED_LEN];
27878        let mut buf = if avail_len < Self::ENCODED_LEN {
27879            payload_buf[0..avail_len].copy_from_slice(__input);
27880            Bytes::new(&payload_buf)
27881        } else {
27882            Bytes::new(__input)
27883        };
27884        let mut __struct = Self::default();
27885        __struct.time_usec = buf.get_u64_le()?;
27886        for v in &mut __struct.controls {
27887            let val = buf.get_f32_le()?;
27888            *v = val;
27889        }
27890        __struct.group_mlx = buf.get_u8()?;
27891        __struct.target_system = buf.get_u8()?;
27892        __struct.target_component = buf.get_u8()?;
27893        Ok(__struct)
27894    }
27895    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27896        let mut __tmp = BytesMut::new(bytes);
27897        #[allow(clippy::absurd_extreme_comparisons)]
27898        #[allow(unused_comparisons)]
27899        if __tmp.remaining() < Self::ENCODED_LEN {
27900            panic!(
27901                "buffer is too small (need {} bytes, but got {})",
27902                Self::ENCODED_LEN,
27903                __tmp.remaining(),
27904            )
27905        }
27906        __tmp.put_u64_le(self.time_usec);
27907        for val in &self.controls {
27908            __tmp.put_f32_le(*val);
27909        }
27910        __tmp.put_u8(self.group_mlx);
27911        __tmp.put_u8(self.target_system);
27912        __tmp.put_u8(self.target_component);
27913        if matches!(version, MavlinkVersion::V2) {
27914            let len = __tmp.len();
27915            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27916        } else {
27917            __tmp.len()
27918        }
27919    }
27920}
27921#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
27922#[doc = ""]
27923#[doc = "ID: 82"]
27924#[derive(Debug, Clone, PartialEq)]
27925#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27926#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27927#[cfg_attr(feature = "ts", derive(TS))]
27928#[cfg_attr(feature = "ts", ts(export))]
27929pub struct SET_ATTITUDE_TARGET_DATA {
27930    #[doc = "Timestamp (time since system boot)."]
27931    pub time_boot_ms: u32,
27932    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
27933    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27934    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27935    pub q: [f32; 4],
27936    #[doc = "Body roll rate"]
27937    pub body_roll_rate: f32,
27938    #[doc = "Body pitch rate"]
27939    pub body_pitch_rate: f32,
27940    #[doc = "Body yaw rate"]
27941    pub body_yaw_rate: f32,
27942    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
27943    pub thrust: f32,
27944    #[doc = "System ID"]
27945    pub target_system: u8,
27946    #[doc = "Component ID"]
27947    pub target_component: u8,
27948    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27949    pub type_mask: AttitudeTargetTypemask,
27950    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
27951    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27952    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27953    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27954    pub thrust_body: [f32; 3],
27955}
27956impl SET_ATTITUDE_TARGET_DATA {
27957    pub const ENCODED_LEN: usize = 51usize;
27958    pub const DEFAULT: Self = Self {
27959        time_boot_ms: 0_u32,
27960        q: [0.0_f32; 4usize],
27961        body_roll_rate: 0.0_f32,
27962        body_pitch_rate: 0.0_f32,
27963        body_yaw_rate: 0.0_f32,
27964        thrust: 0.0_f32,
27965        target_system: 0_u8,
27966        target_component: 0_u8,
27967        type_mask: AttitudeTargetTypemask::DEFAULT,
27968        thrust_body: [0.0_f32; 3usize],
27969    };
27970    #[cfg(feature = "arbitrary")]
27971    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27972        use arbitrary::{Arbitrary, Unstructured};
27973        let mut buf = [0u8; 1024];
27974        rng.fill_bytes(&mut buf);
27975        let mut unstructured = Unstructured::new(&buf);
27976        Self::arbitrary(&mut unstructured).unwrap_or_default()
27977    }
27978}
27979impl Default for SET_ATTITUDE_TARGET_DATA {
27980    fn default() -> Self {
27981        Self::DEFAULT.clone()
27982    }
27983}
27984impl MessageData for SET_ATTITUDE_TARGET_DATA {
27985    type Message = MavMessage;
27986    const ID: u32 = 82u32;
27987    const NAME: &'static str = "SET_ATTITUDE_TARGET";
27988    const EXTRA_CRC: u8 = 49u8;
27989    const ENCODED_LEN: usize = 51usize;
27990    fn deser(
27991        _version: MavlinkVersion,
27992        __input: &[u8],
27993    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27994        let avail_len = __input.len();
27995        let mut payload_buf = [0; Self::ENCODED_LEN];
27996        let mut buf = if avail_len < Self::ENCODED_LEN {
27997            payload_buf[0..avail_len].copy_from_slice(__input);
27998            Bytes::new(&payload_buf)
27999        } else {
28000            Bytes::new(__input)
28001        };
28002        let mut __struct = Self::default();
28003        __struct.time_boot_ms = buf.get_u32_le()?;
28004        for v in &mut __struct.q {
28005            let val = buf.get_f32_le()?;
28006            *v = val;
28007        }
28008        __struct.body_roll_rate = buf.get_f32_le()?;
28009        __struct.body_pitch_rate = buf.get_f32_le()?;
28010        __struct.body_yaw_rate = buf.get_f32_le()?;
28011        __struct.thrust = buf.get_f32_le()?;
28012        __struct.target_system = buf.get_u8()?;
28013        __struct.target_component = buf.get_u8()?;
28014        let tmp = buf.get_u8()?;
28015        __struct.type_mask =
28016            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
28017                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28018                    flag_type: "AttitudeTargetTypemask",
28019                    value: tmp as u64,
28020                })?;
28021        for v in &mut __struct.thrust_body {
28022            let val = buf.get_f32_le()?;
28023            *v = val;
28024        }
28025        Ok(__struct)
28026    }
28027    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28028        let mut __tmp = BytesMut::new(bytes);
28029        #[allow(clippy::absurd_extreme_comparisons)]
28030        #[allow(unused_comparisons)]
28031        if __tmp.remaining() < Self::ENCODED_LEN {
28032            panic!(
28033                "buffer is too small (need {} bytes, but got {})",
28034                Self::ENCODED_LEN,
28035                __tmp.remaining(),
28036            )
28037        }
28038        __tmp.put_u32_le(self.time_boot_ms);
28039        for val in &self.q {
28040            __tmp.put_f32_le(*val);
28041        }
28042        __tmp.put_f32_le(self.body_roll_rate);
28043        __tmp.put_f32_le(self.body_pitch_rate);
28044        __tmp.put_f32_le(self.body_yaw_rate);
28045        __tmp.put_f32_le(self.thrust);
28046        __tmp.put_u8(self.target_system);
28047        __tmp.put_u8(self.target_component);
28048        __tmp.put_u8(self.type_mask.bits() as u8);
28049        if matches!(version, MavlinkVersion::V2) {
28050            for val in &self.thrust_body {
28051                __tmp.put_f32_le(*val);
28052            }
28053            let len = __tmp.len();
28054            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28055        } else {
28056            __tmp.len()
28057        }
28058    }
28059}
28060#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
28061#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
28062#[doc = ""]
28063#[doc = "ID: 48"]
28064#[derive(Debug, Clone, PartialEq)]
28065#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28066#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28067#[cfg_attr(feature = "ts", derive(TS))]
28068#[cfg_attr(feature = "ts", ts(export))]
28069pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
28070    #[doc = "Latitude (WGS84)"]
28071    pub latitude: i32,
28072    #[doc = "Longitude (WGS84)"]
28073    pub longitude: i32,
28074    #[doc = "Altitude (MSL). Positive for up."]
28075    pub altitude: i32,
28076    #[doc = "System ID"]
28077    pub target_system: u8,
28078    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28079    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28080    pub time_usec: u64,
28081}
28082impl SET_GPS_GLOBAL_ORIGIN_DATA {
28083    pub const ENCODED_LEN: usize = 21usize;
28084    pub const DEFAULT: Self = Self {
28085        latitude: 0_i32,
28086        longitude: 0_i32,
28087        altitude: 0_i32,
28088        target_system: 0_u8,
28089        time_usec: 0_u64,
28090    };
28091    #[cfg(feature = "arbitrary")]
28092    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28093        use arbitrary::{Arbitrary, Unstructured};
28094        let mut buf = [0u8; 1024];
28095        rng.fill_bytes(&mut buf);
28096        let mut unstructured = Unstructured::new(&buf);
28097        Self::arbitrary(&mut unstructured).unwrap_or_default()
28098    }
28099}
28100impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
28101    fn default() -> Self {
28102        Self::DEFAULT.clone()
28103    }
28104}
28105impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
28106    type Message = MavMessage;
28107    const ID: u32 = 48u32;
28108    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
28109    const EXTRA_CRC: u8 = 41u8;
28110    const ENCODED_LEN: usize = 21usize;
28111    fn deser(
28112        _version: MavlinkVersion,
28113        __input: &[u8],
28114    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28115        let avail_len = __input.len();
28116        let mut payload_buf = [0; Self::ENCODED_LEN];
28117        let mut buf = if avail_len < Self::ENCODED_LEN {
28118            payload_buf[0..avail_len].copy_from_slice(__input);
28119            Bytes::new(&payload_buf)
28120        } else {
28121            Bytes::new(__input)
28122        };
28123        let mut __struct = Self::default();
28124        __struct.latitude = buf.get_i32_le()?;
28125        __struct.longitude = buf.get_i32_le()?;
28126        __struct.altitude = buf.get_i32_le()?;
28127        __struct.target_system = buf.get_u8()?;
28128        __struct.time_usec = buf.get_u64_le()?;
28129        Ok(__struct)
28130    }
28131    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28132        let mut __tmp = BytesMut::new(bytes);
28133        #[allow(clippy::absurd_extreme_comparisons)]
28134        #[allow(unused_comparisons)]
28135        if __tmp.remaining() < Self::ENCODED_LEN {
28136            panic!(
28137                "buffer is too small (need {} bytes, but got {})",
28138                Self::ENCODED_LEN,
28139                __tmp.remaining(),
28140            )
28141        }
28142        __tmp.put_i32_le(self.latitude);
28143        __tmp.put_i32_le(self.longitude);
28144        __tmp.put_i32_le(self.altitude);
28145        __tmp.put_u8(self.target_system);
28146        if matches!(version, MavlinkVersion::V2) {
28147            __tmp.put_u64_le(self.time_usec);
28148            let len = __tmp.len();
28149            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28150        } else {
28151            __tmp.len()
28152        }
28153    }
28154}
28155#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
28156#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
28157#[doc = ""]
28158#[doc = "ID: 243"]
28159#[derive(Debug, Clone, PartialEq)]
28160#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28161#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28162#[cfg_attr(feature = "ts", derive(TS))]
28163#[cfg_attr(feature = "ts", ts(export))]
28164pub struct SET_HOME_POSITION_DATA {
28165    #[doc = "Latitude (WGS84)"]
28166    pub latitude: i32,
28167    #[doc = "Longitude (WGS84)"]
28168    pub longitude: i32,
28169    #[doc = "Altitude (MSL). Positive for up."]
28170    pub altitude: i32,
28171    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
28172    pub x: f32,
28173    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
28174    pub y: f32,
28175    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
28176    pub z: f32,
28177    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
28178    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28179    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28180    pub q: [f32; 4],
28181    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28182    pub approach_x: f32,
28183    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28184    pub approach_y: f32,
28185    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28186    pub approach_z: f32,
28187    #[doc = "System ID."]
28188    pub target_system: u8,
28189    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28190    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28191    pub time_usec: u64,
28192}
28193impl SET_HOME_POSITION_DATA {
28194    pub const ENCODED_LEN: usize = 61usize;
28195    pub const DEFAULT: Self = Self {
28196        latitude: 0_i32,
28197        longitude: 0_i32,
28198        altitude: 0_i32,
28199        x: 0.0_f32,
28200        y: 0.0_f32,
28201        z: 0.0_f32,
28202        q: [0.0_f32; 4usize],
28203        approach_x: 0.0_f32,
28204        approach_y: 0.0_f32,
28205        approach_z: 0.0_f32,
28206        target_system: 0_u8,
28207        time_usec: 0_u64,
28208    };
28209    #[cfg(feature = "arbitrary")]
28210    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28211        use arbitrary::{Arbitrary, Unstructured};
28212        let mut buf = [0u8; 1024];
28213        rng.fill_bytes(&mut buf);
28214        let mut unstructured = Unstructured::new(&buf);
28215        Self::arbitrary(&mut unstructured).unwrap_or_default()
28216    }
28217}
28218impl Default for SET_HOME_POSITION_DATA {
28219    fn default() -> Self {
28220        Self::DEFAULT.clone()
28221    }
28222}
28223impl MessageData for SET_HOME_POSITION_DATA {
28224    type Message = MavMessage;
28225    const ID: u32 = 243u32;
28226    const NAME: &'static str = "SET_HOME_POSITION";
28227    const EXTRA_CRC: u8 = 85u8;
28228    const ENCODED_LEN: usize = 61usize;
28229    fn deser(
28230        _version: MavlinkVersion,
28231        __input: &[u8],
28232    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28233        let avail_len = __input.len();
28234        let mut payload_buf = [0; Self::ENCODED_LEN];
28235        let mut buf = if avail_len < Self::ENCODED_LEN {
28236            payload_buf[0..avail_len].copy_from_slice(__input);
28237            Bytes::new(&payload_buf)
28238        } else {
28239            Bytes::new(__input)
28240        };
28241        let mut __struct = Self::default();
28242        __struct.latitude = buf.get_i32_le()?;
28243        __struct.longitude = buf.get_i32_le()?;
28244        __struct.altitude = buf.get_i32_le()?;
28245        __struct.x = buf.get_f32_le()?;
28246        __struct.y = buf.get_f32_le()?;
28247        __struct.z = buf.get_f32_le()?;
28248        for v in &mut __struct.q {
28249            let val = buf.get_f32_le()?;
28250            *v = val;
28251        }
28252        __struct.approach_x = buf.get_f32_le()?;
28253        __struct.approach_y = buf.get_f32_le()?;
28254        __struct.approach_z = buf.get_f32_le()?;
28255        __struct.target_system = buf.get_u8()?;
28256        __struct.time_usec = buf.get_u64_le()?;
28257        Ok(__struct)
28258    }
28259    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28260        let mut __tmp = BytesMut::new(bytes);
28261        #[allow(clippy::absurd_extreme_comparisons)]
28262        #[allow(unused_comparisons)]
28263        if __tmp.remaining() < Self::ENCODED_LEN {
28264            panic!(
28265                "buffer is too small (need {} bytes, but got {})",
28266                Self::ENCODED_LEN,
28267                __tmp.remaining(),
28268            )
28269        }
28270        __tmp.put_i32_le(self.latitude);
28271        __tmp.put_i32_le(self.longitude);
28272        __tmp.put_i32_le(self.altitude);
28273        __tmp.put_f32_le(self.x);
28274        __tmp.put_f32_le(self.y);
28275        __tmp.put_f32_le(self.z);
28276        for val in &self.q {
28277            __tmp.put_f32_le(*val);
28278        }
28279        __tmp.put_f32_le(self.approach_x);
28280        __tmp.put_f32_le(self.approach_y);
28281        __tmp.put_f32_le(self.approach_z);
28282        __tmp.put_u8(self.target_system);
28283        if matches!(version, MavlinkVersion::V2) {
28284            __tmp.put_u64_le(self.time_usec);
28285            let len = __tmp.len();
28286            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28287        } else {
28288            __tmp.len()
28289        }
28290    }
28291}
28292#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
28293#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
28294#[doc = ""]
28295#[doc = "ID: 11"]
28296#[derive(Debug, Clone, PartialEq)]
28297#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28298#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28299#[cfg_attr(feature = "ts", derive(TS))]
28300#[cfg_attr(feature = "ts", ts(export))]
28301pub struct SET_MODE_DATA {
28302    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
28303    pub custom_mode: u32,
28304    #[doc = "The system setting the mode"]
28305    pub target_system: u8,
28306    #[doc = "The new base mode."]
28307    pub base_mode: MavMode,
28308}
28309impl SET_MODE_DATA {
28310    pub const ENCODED_LEN: usize = 6usize;
28311    pub const DEFAULT: Self = Self {
28312        custom_mode: 0_u32,
28313        target_system: 0_u8,
28314        base_mode: MavMode::DEFAULT,
28315    };
28316    #[cfg(feature = "arbitrary")]
28317    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28318        use arbitrary::{Arbitrary, Unstructured};
28319        let mut buf = [0u8; 1024];
28320        rng.fill_bytes(&mut buf);
28321        let mut unstructured = Unstructured::new(&buf);
28322        Self::arbitrary(&mut unstructured).unwrap_or_default()
28323    }
28324}
28325impl Default for SET_MODE_DATA {
28326    fn default() -> Self {
28327        Self::DEFAULT.clone()
28328    }
28329}
28330impl MessageData for SET_MODE_DATA {
28331    type Message = MavMessage;
28332    const ID: u32 = 11u32;
28333    const NAME: &'static str = "SET_MODE";
28334    const EXTRA_CRC: u8 = 89u8;
28335    const ENCODED_LEN: usize = 6usize;
28336    fn deser(
28337        _version: MavlinkVersion,
28338        __input: &[u8],
28339    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28340        let avail_len = __input.len();
28341        let mut payload_buf = [0; Self::ENCODED_LEN];
28342        let mut buf = if avail_len < Self::ENCODED_LEN {
28343            payload_buf[0..avail_len].copy_from_slice(__input);
28344            Bytes::new(&payload_buf)
28345        } else {
28346            Bytes::new(__input)
28347        };
28348        let mut __struct = Self::default();
28349        __struct.custom_mode = buf.get_u32_le()?;
28350        __struct.target_system = buf.get_u8()?;
28351        let tmp = buf.get_u8()?;
28352        __struct.base_mode =
28353            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28354                enum_type: "MavMode",
28355                value: tmp as u64,
28356            })?;
28357        Ok(__struct)
28358    }
28359    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28360        let mut __tmp = BytesMut::new(bytes);
28361        #[allow(clippy::absurd_extreme_comparisons)]
28362        #[allow(unused_comparisons)]
28363        if __tmp.remaining() < Self::ENCODED_LEN {
28364            panic!(
28365                "buffer is too small (need {} bytes, but got {})",
28366                Self::ENCODED_LEN,
28367                __tmp.remaining(),
28368            )
28369        }
28370        __tmp.put_u32_le(self.custom_mode);
28371        __tmp.put_u8(self.target_system);
28372        __tmp.put_u8(self.base_mode as u8);
28373        if matches!(version, MavlinkVersion::V2) {
28374            let len = __tmp.len();
28375            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28376        } else {
28377            __tmp.len()
28378        }
28379    }
28380}
28381#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
28382#[doc = ""]
28383#[doc = "ID: 86"]
28384#[derive(Debug, Clone, PartialEq)]
28385#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28386#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28387#[cfg_attr(feature = "ts", derive(TS))]
28388#[cfg_attr(feature = "ts", ts(export))]
28389pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
28390    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
28391    pub time_boot_ms: u32,
28392    #[doc = "Latitude in WGS84 frame"]
28393    pub lat_int: i32,
28394    #[doc = "Longitude in WGS84 frame"]
28395    pub lon_int: i32,
28396    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
28397    pub alt: f32,
28398    #[doc = "X velocity in NED frame"]
28399    pub vx: f32,
28400    #[doc = "Y velocity in NED frame"]
28401    pub vy: f32,
28402    #[doc = "Z velocity in NED frame"]
28403    pub vz: f32,
28404    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28405    pub afx: f32,
28406    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28407    pub afy: f32,
28408    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28409    pub afz: f32,
28410    #[doc = "yaw setpoint"]
28411    pub yaw: f32,
28412    #[doc = "yaw rate setpoint"]
28413    pub yaw_rate: f32,
28414    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28415    pub type_mask: PositionTargetTypemask,
28416    #[doc = "System ID"]
28417    pub target_system: u8,
28418    #[doc = "Component ID"]
28419    pub target_component: u8,
28420    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
28421    pub coordinate_frame: MavFrame,
28422}
28423impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
28424    pub const ENCODED_LEN: usize = 53usize;
28425    pub const DEFAULT: Self = Self {
28426        time_boot_ms: 0_u32,
28427        lat_int: 0_i32,
28428        lon_int: 0_i32,
28429        alt: 0.0_f32,
28430        vx: 0.0_f32,
28431        vy: 0.0_f32,
28432        vz: 0.0_f32,
28433        afx: 0.0_f32,
28434        afy: 0.0_f32,
28435        afz: 0.0_f32,
28436        yaw: 0.0_f32,
28437        yaw_rate: 0.0_f32,
28438        type_mask: PositionTargetTypemask::DEFAULT,
28439        target_system: 0_u8,
28440        target_component: 0_u8,
28441        coordinate_frame: MavFrame::DEFAULT,
28442    };
28443    #[cfg(feature = "arbitrary")]
28444    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28445        use arbitrary::{Arbitrary, Unstructured};
28446        let mut buf = [0u8; 1024];
28447        rng.fill_bytes(&mut buf);
28448        let mut unstructured = Unstructured::new(&buf);
28449        Self::arbitrary(&mut unstructured).unwrap_or_default()
28450    }
28451}
28452impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28453    fn default() -> Self {
28454        Self::DEFAULT.clone()
28455    }
28456}
28457impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28458    type Message = MavMessage;
28459    const ID: u32 = 86u32;
28460    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
28461    const EXTRA_CRC: u8 = 5u8;
28462    const ENCODED_LEN: usize = 53usize;
28463    fn deser(
28464        _version: MavlinkVersion,
28465        __input: &[u8],
28466    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28467        let avail_len = __input.len();
28468        let mut payload_buf = [0; Self::ENCODED_LEN];
28469        let mut buf = if avail_len < Self::ENCODED_LEN {
28470            payload_buf[0..avail_len].copy_from_slice(__input);
28471            Bytes::new(&payload_buf)
28472        } else {
28473            Bytes::new(__input)
28474        };
28475        let mut __struct = Self::default();
28476        __struct.time_boot_ms = buf.get_u32_le()?;
28477        __struct.lat_int = buf.get_i32_le()?;
28478        __struct.lon_int = buf.get_i32_le()?;
28479        __struct.alt = buf.get_f32_le()?;
28480        __struct.vx = buf.get_f32_le()?;
28481        __struct.vy = buf.get_f32_le()?;
28482        __struct.vz = buf.get_f32_le()?;
28483        __struct.afx = buf.get_f32_le()?;
28484        __struct.afy = buf.get_f32_le()?;
28485        __struct.afz = buf.get_f32_le()?;
28486        __struct.yaw = buf.get_f32_le()?;
28487        __struct.yaw_rate = buf.get_f32_le()?;
28488        let tmp = buf.get_u16_le()?;
28489        __struct.type_mask =
28490            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
28491                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28492                    flag_type: "PositionTargetTypemask",
28493                    value: tmp as u64,
28494                })?;
28495        __struct.target_system = buf.get_u8()?;
28496        __struct.target_component = buf.get_u8()?;
28497        let tmp = buf.get_u8()?;
28498        __struct.coordinate_frame =
28499            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28500                enum_type: "MavFrame",
28501                value: tmp as u64,
28502            })?;
28503        Ok(__struct)
28504    }
28505    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28506        let mut __tmp = BytesMut::new(bytes);
28507        #[allow(clippy::absurd_extreme_comparisons)]
28508        #[allow(unused_comparisons)]
28509        if __tmp.remaining() < Self::ENCODED_LEN {
28510            panic!(
28511                "buffer is too small (need {} bytes, but got {})",
28512                Self::ENCODED_LEN,
28513                __tmp.remaining(),
28514            )
28515        }
28516        __tmp.put_u32_le(self.time_boot_ms);
28517        __tmp.put_i32_le(self.lat_int);
28518        __tmp.put_i32_le(self.lon_int);
28519        __tmp.put_f32_le(self.alt);
28520        __tmp.put_f32_le(self.vx);
28521        __tmp.put_f32_le(self.vy);
28522        __tmp.put_f32_le(self.vz);
28523        __tmp.put_f32_le(self.afx);
28524        __tmp.put_f32_le(self.afy);
28525        __tmp.put_f32_le(self.afz);
28526        __tmp.put_f32_le(self.yaw);
28527        __tmp.put_f32_le(self.yaw_rate);
28528        __tmp.put_u16_le(self.type_mask.bits() as u16);
28529        __tmp.put_u8(self.target_system);
28530        __tmp.put_u8(self.target_component);
28531        __tmp.put_u8(self.coordinate_frame as u8);
28532        if matches!(version, MavlinkVersion::V2) {
28533            let len = __tmp.len();
28534            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28535        } else {
28536            __tmp.len()
28537        }
28538    }
28539}
28540#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
28541#[doc = ""]
28542#[doc = "ID: 84"]
28543#[derive(Debug, Clone, PartialEq)]
28544#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28545#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28546#[cfg_attr(feature = "ts", derive(TS))]
28547#[cfg_attr(feature = "ts", ts(export))]
28548pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
28549    #[doc = "Timestamp (time since system boot)."]
28550    pub time_boot_ms: u32,
28551    #[doc = "X Position in NED frame"]
28552    pub x: f32,
28553    #[doc = "Y Position in NED frame"]
28554    pub y: f32,
28555    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
28556    pub z: f32,
28557    #[doc = "X velocity in NED frame"]
28558    pub vx: f32,
28559    #[doc = "Y velocity in NED frame"]
28560    pub vy: f32,
28561    #[doc = "Z velocity in NED frame"]
28562    pub vz: f32,
28563    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28564    pub afx: f32,
28565    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28566    pub afy: f32,
28567    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28568    pub afz: f32,
28569    #[doc = "yaw setpoint"]
28570    pub yaw: f32,
28571    #[doc = "yaw rate setpoint"]
28572    pub yaw_rate: f32,
28573    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28574    pub type_mask: PositionTargetTypemask,
28575    #[doc = "System ID"]
28576    pub target_system: u8,
28577    #[doc = "Component ID"]
28578    pub target_component: u8,
28579    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
28580    pub coordinate_frame: MavFrame,
28581}
28582impl SET_POSITION_TARGET_LOCAL_NED_DATA {
28583    pub const ENCODED_LEN: usize = 53usize;
28584    pub const DEFAULT: Self = Self {
28585        time_boot_ms: 0_u32,
28586        x: 0.0_f32,
28587        y: 0.0_f32,
28588        z: 0.0_f32,
28589        vx: 0.0_f32,
28590        vy: 0.0_f32,
28591        vz: 0.0_f32,
28592        afx: 0.0_f32,
28593        afy: 0.0_f32,
28594        afz: 0.0_f32,
28595        yaw: 0.0_f32,
28596        yaw_rate: 0.0_f32,
28597        type_mask: PositionTargetTypemask::DEFAULT,
28598        target_system: 0_u8,
28599        target_component: 0_u8,
28600        coordinate_frame: MavFrame::DEFAULT,
28601    };
28602    #[cfg(feature = "arbitrary")]
28603    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28604        use arbitrary::{Arbitrary, Unstructured};
28605        let mut buf = [0u8; 1024];
28606        rng.fill_bytes(&mut buf);
28607        let mut unstructured = Unstructured::new(&buf);
28608        Self::arbitrary(&mut unstructured).unwrap_or_default()
28609    }
28610}
28611impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
28612    fn default() -> Self {
28613        Self::DEFAULT.clone()
28614    }
28615}
28616impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
28617    type Message = MavMessage;
28618    const ID: u32 = 84u32;
28619    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
28620    const EXTRA_CRC: u8 = 143u8;
28621    const ENCODED_LEN: usize = 53usize;
28622    fn deser(
28623        _version: MavlinkVersion,
28624        __input: &[u8],
28625    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28626        let avail_len = __input.len();
28627        let mut payload_buf = [0; Self::ENCODED_LEN];
28628        let mut buf = if avail_len < Self::ENCODED_LEN {
28629            payload_buf[0..avail_len].copy_from_slice(__input);
28630            Bytes::new(&payload_buf)
28631        } else {
28632            Bytes::new(__input)
28633        };
28634        let mut __struct = Self::default();
28635        __struct.time_boot_ms = buf.get_u32_le()?;
28636        __struct.x = buf.get_f32_le()?;
28637        __struct.y = buf.get_f32_le()?;
28638        __struct.z = buf.get_f32_le()?;
28639        __struct.vx = buf.get_f32_le()?;
28640        __struct.vy = buf.get_f32_le()?;
28641        __struct.vz = buf.get_f32_le()?;
28642        __struct.afx = buf.get_f32_le()?;
28643        __struct.afy = buf.get_f32_le()?;
28644        __struct.afz = buf.get_f32_le()?;
28645        __struct.yaw = buf.get_f32_le()?;
28646        __struct.yaw_rate = buf.get_f32_le()?;
28647        let tmp = buf.get_u16_le()?;
28648        __struct.type_mask =
28649            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
28650                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28651                    flag_type: "PositionTargetTypemask",
28652                    value: tmp as u64,
28653                })?;
28654        __struct.target_system = buf.get_u8()?;
28655        __struct.target_component = buf.get_u8()?;
28656        let tmp = buf.get_u8()?;
28657        __struct.coordinate_frame =
28658            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28659                enum_type: "MavFrame",
28660                value: tmp as u64,
28661            })?;
28662        Ok(__struct)
28663    }
28664    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28665        let mut __tmp = BytesMut::new(bytes);
28666        #[allow(clippy::absurd_extreme_comparisons)]
28667        #[allow(unused_comparisons)]
28668        if __tmp.remaining() < Self::ENCODED_LEN {
28669            panic!(
28670                "buffer is too small (need {} bytes, but got {})",
28671                Self::ENCODED_LEN,
28672                __tmp.remaining(),
28673            )
28674        }
28675        __tmp.put_u32_le(self.time_boot_ms);
28676        __tmp.put_f32_le(self.x);
28677        __tmp.put_f32_le(self.y);
28678        __tmp.put_f32_le(self.z);
28679        __tmp.put_f32_le(self.vx);
28680        __tmp.put_f32_le(self.vy);
28681        __tmp.put_f32_le(self.vz);
28682        __tmp.put_f32_le(self.afx);
28683        __tmp.put_f32_le(self.afy);
28684        __tmp.put_f32_le(self.afz);
28685        __tmp.put_f32_le(self.yaw);
28686        __tmp.put_f32_le(self.yaw_rate);
28687        __tmp.put_u16_le(self.type_mask.bits() as u16);
28688        __tmp.put_u8(self.target_system);
28689        __tmp.put_u8(self.target_component);
28690        __tmp.put_u8(self.coordinate_frame as u8);
28691        if matches!(version, MavlinkVersion::V2) {
28692            let len = __tmp.len();
28693            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28694        } else {
28695            __tmp.len()
28696        }
28697    }
28698}
28699#[doc = "Status of simulation environment, if used."]
28700#[doc = ""]
28701#[doc = "ID: 108"]
28702#[derive(Debug, Clone, PartialEq)]
28703#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28704#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28705#[cfg_attr(feature = "ts", derive(TS))]
28706#[cfg_attr(feature = "ts", ts(export))]
28707pub struct SIM_STATE_DATA {
28708    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
28709    pub q1: f32,
28710    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
28711    pub q2: f32,
28712    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
28713    pub q3: f32,
28714    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
28715    pub q4: f32,
28716    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
28717    pub roll: f32,
28718    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
28719    pub pitch: f32,
28720    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
28721    pub yaw: f32,
28722    #[doc = "X acceleration"]
28723    pub xacc: f32,
28724    #[doc = "Y acceleration"]
28725    pub yacc: f32,
28726    #[doc = "Z acceleration"]
28727    pub zacc: f32,
28728    #[doc = "Angular speed around X axis"]
28729    pub xgyro: f32,
28730    #[doc = "Angular speed around Y axis"]
28731    pub ygyro: f32,
28732    #[doc = "Angular speed around Z axis"]
28733    pub zgyro: f32,
28734    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
28735    pub lat: f32,
28736    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
28737    pub lon: f32,
28738    #[doc = "Altitude"]
28739    pub alt: f32,
28740    #[doc = "Horizontal position standard deviation"]
28741    pub std_dev_horz: f32,
28742    #[doc = "Vertical position standard deviation"]
28743    pub std_dev_vert: f32,
28744    #[doc = "True velocity in north direction in earth-fixed NED frame"]
28745    pub vn: f32,
28746    #[doc = "True velocity in east direction in earth-fixed NED frame"]
28747    pub ve: f32,
28748    #[doc = "True velocity in down direction in earth-fixed NED frame"]
28749    pub vd: f32,
28750    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
28751    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28752    pub lat_int: i32,
28753    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
28754    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28755    pub lon_int: i32,
28756}
28757impl SIM_STATE_DATA {
28758    pub const ENCODED_LEN: usize = 92usize;
28759    pub const DEFAULT: Self = Self {
28760        q1: 0.0_f32,
28761        q2: 0.0_f32,
28762        q3: 0.0_f32,
28763        q4: 0.0_f32,
28764        roll: 0.0_f32,
28765        pitch: 0.0_f32,
28766        yaw: 0.0_f32,
28767        xacc: 0.0_f32,
28768        yacc: 0.0_f32,
28769        zacc: 0.0_f32,
28770        xgyro: 0.0_f32,
28771        ygyro: 0.0_f32,
28772        zgyro: 0.0_f32,
28773        lat: 0.0_f32,
28774        lon: 0.0_f32,
28775        alt: 0.0_f32,
28776        std_dev_horz: 0.0_f32,
28777        std_dev_vert: 0.0_f32,
28778        vn: 0.0_f32,
28779        ve: 0.0_f32,
28780        vd: 0.0_f32,
28781        lat_int: 0_i32,
28782        lon_int: 0_i32,
28783    };
28784    #[cfg(feature = "arbitrary")]
28785    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28786        use arbitrary::{Arbitrary, Unstructured};
28787        let mut buf = [0u8; 1024];
28788        rng.fill_bytes(&mut buf);
28789        let mut unstructured = Unstructured::new(&buf);
28790        Self::arbitrary(&mut unstructured).unwrap_or_default()
28791    }
28792}
28793impl Default for SIM_STATE_DATA {
28794    fn default() -> Self {
28795        Self::DEFAULT.clone()
28796    }
28797}
28798impl MessageData for SIM_STATE_DATA {
28799    type Message = MavMessage;
28800    const ID: u32 = 108u32;
28801    const NAME: &'static str = "SIM_STATE";
28802    const EXTRA_CRC: u8 = 32u8;
28803    const ENCODED_LEN: usize = 92usize;
28804    fn deser(
28805        _version: MavlinkVersion,
28806        __input: &[u8],
28807    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28808        let avail_len = __input.len();
28809        let mut payload_buf = [0; Self::ENCODED_LEN];
28810        let mut buf = if avail_len < Self::ENCODED_LEN {
28811            payload_buf[0..avail_len].copy_from_slice(__input);
28812            Bytes::new(&payload_buf)
28813        } else {
28814            Bytes::new(__input)
28815        };
28816        let mut __struct = Self::default();
28817        __struct.q1 = buf.get_f32_le()?;
28818        __struct.q2 = buf.get_f32_le()?;
28819        __struct.q3 = buf.get_f32_le()?;
28820        __struct.q4 = buf.get_f32_le()?;
28821        __struct.roll = buf.get_f32_le()?;
28822        __struct.pitch = buf.get_f32_le()?;
28823        __struct.yaw = buf.get_f32_le()?;
28824        __struct.xacc = buf.get_f32_le()?;
28825        __struct.yacc = buf.get_f32_le()?;
28826        __struct.zacc = buf.get_f32_le()?;
28827        __struct.xgyro = buf.get_f32_le()?;
28828        __struct.ygyro = buf.get_f32_le()?;
28829        __struct.zgyro = buf.get_f32_le()?;
28830        __struct.lat = buf.get_f32_le()?;
28831        __struct.lon = buf.get_f32_le()?;
28832        __struct.alt = buf.get_f32_le()?;
28833        __struct.std_dev_horz = buf.get_f32_le()?;
28834        __struct.std_dev_vert = buf.get_f32_le()?;
28835        __struct.vn = buf.get_f32_le()?;
28836        __struct.ve = buf.get_f32_le()?;
28837        __struct.vd = buf.get_f32_le()?;
28838        __struct.lat_int = buf.get_i32_le()?;
28839        __struct.lon_int = buf.get_i32_le()?;
28840        Ok(__struct)
28841    }
28842    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28843        let mut __tmp = BytesMut::new(bytes);
28844        #[allow(clippy::absurd_extreme_comparisons)]
28845        #[allow(unused_comparisons)]
28846        if __tmp.remaining() < Self::ENCODED_LEN {
28847            panic!(
28848                "buffer is too small (need {} bytes, but got {})",
28849                Self::ENCODED_LEN,
28850                __tmp.remaining(),
28851            )
28852        }
28853        __tmp.put_f32_le(self.q1);
28854        __tmp.put_f32_le(self.q2);
28855        __tmp.put_f32_le(self.q3);
28856        __tmp.put_f32_le(self.q4);
28857        __tmp.put_f32_le(self.roll);
28858        __tmp.put_f32_le(self.pitch);
28859        __tmp.put_f32_le(self.yaw);
28860        __tmp.put_f32_le(self.xacc);
28861        __tmp.put_f32_le(self.yacc);
28862        __tmp.put_f32_le(self.zacc);
28863        __tmp.put_f32_le(self.xgyro);
28864        __tmp.put_f32_le(self.ygyro);
28865        __tmp.put_f32_le(self.zgyro);
28866        __tmp.put_f32_le(self.lat);
28867        __tmp.put_f32_le(self.lon);
28868        __tmp.put_f32_le(self.alt);
28869        __tmp.put_f32_le(self.std_dev_horz);
28870        __tmp.put_f32_le(self.std_dev_vert);
28871        __tmp.put_f32_le(self.vn);
28872        __tmp.put_f32_le(self.ve);
28873        __tmp.put_f32_le(self.vd);
28874        if matches!(version, MavlinkVersion::V2) {
28875            __tmp.put_i32_le(self.lat_int);
28876            __tmp.put_i32_le(self.lon_int);
28877            let len = __tmp.len();
28878            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28879        } else {
28880            __tmp.len()
28881        }
28882    }
28883}
28884#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
28885#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
28886#[doc = ""]
28887#[doc = "ID: 370"]
28888#[derive(Debug, Clone, PartialEq)]
28889#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28890#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28891#[cfg_attr(feature = "ts", derive(TS))]
28892#[cfg_attr(feature = "ts", ts(export))]
28893pub struct SMART_BATTERY_INFO_DATA {
28894    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
28895    pub capacity_full_specification: i32,
28896    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
28897    pub capacity_full: i32,
28898    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
28899    pub cycle_count: u16,
28900    #[doc = "Battery weight. 0: field not provided."]
28901    pub weight: u16,
28902    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
28903    pub discharge_minimum_voltage: u16,
28904    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
28905    pub charging_minimum_voltage: u16,
28906    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
28907    pub resting_minimum_voltage: u16,
28908    #[doc = "Battery ID"]
28909    pub id: u8,
28910    #[doc = "Function of the battery"]
28911    pub battery_function: MavBatteryFunction,
28912    #[doc = "Type (chemistry) of the battery"]
28913    pub mavtype: MavBatteryType,
28914    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
28915    #[cfg_attr(feature = "ts", ts(type = "string"))]
28916    pub serial_number: CharArray<16>,
28917    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
28918    #[cfg_attr(feature = "ts", ts(type = "string"))]
28919    pub device_name: CharArray<50>,
28920    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
28921    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28922    pub charging_maximum_voltage: u16,
28923    #[doc = "Number of battery cells in series. 0: field not provided."]
28924    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28925    pub cells_in_series: u8,
28926    #[doc = "Maximum pack discharge current. 0: field not provided."]
28927    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28928    pub discharge_maximum_current: u32,
28929    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
28930    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28931    pub discharge_maximum_burst_current: u32,
28932    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
28933    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28934    #[cfg_attr(feature = "ts", ts(type = "string"))]
28935    pub manufacture_date: CharArray<11>,
28936}
28937impl SMART_BATTERY_INFO_DATA {
28938    pub const ENCODED_LEN: usize = 109usize;
28939    pub const DEFAULT: Self = Self {
28940        capacity_full_specification: 0_i32,
28941        capacity_full: 0_i32,
28942        cycle_count: 0_u16,
28943        weight: 0_u16,
28944        discharge_minimum_voltage: 0_u16,
28945        charging_minimum_voltage: 0_u16,
28946        resting_minimum_voltage: 0_u16,
28947        id: 0_u8,
28948        battery_function: MavBatteryFunction::DEFAULT,
28949        mavtype: MavBatteryType::DEFAULT,
28950        serial_number: CharArray::new([0_u8; 16usize]),
28951        device_name: CharArray::new([0_u8; 50usize]),
28952        charging_maximum_voltage: 0_u16,
28953        cells_in_series: 0_u8,
28954        discharge_maximum_current: 0_u32,
28955        discharge_maximum_burst_current: 0_u32,
28956        manufacture_date: CharArray::new([0_u8; 11usize]),
28957    };
28958    #[cfg(feature = "arbitrary")]
28959    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28960        use arbitrary::{Arbitrary, Unstructured};
28961        let mut buf = [0u8; 1024];
28962        rng.fill_bytes(&mut buf);
28963        let mut unstructured = Unstructured::new(&buf);
28964        Self::arbitrary(&mut unstructured).unwrap_or_default()
28965    }
28966}
28967impl Default for SMART_BATTERY_INFO_DATA {
28968    fn default() -> Self {
28969        Self::DEFAULT.clone()
28970    }
28971}
28972impl MessageData for SMART_BATTERY_INFO_DATA {
28973    type Message = MavMessage;
28974    const ID: u32 = 370u32;
28975    const NAME: &'static str = "SMART_BATTERY_INFO";
28976    const EXTRA_CRC: u8 = 75u8;
28977    const ENCODED_LEN: usize = 109usize;
28978    fn deser(
28979        _version: MavlinkVersion,
28980        __input: &[u8],
28981    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28982        let avail_len = __input.len();
28983        let mut payload_buf = [0; Self::ENCODED_LEN];
28984        let mut buf = if avail_len < Self::ENCODED_LEN {
28985            payload_buf[0..avail_len].copy_from_slice(__input);
28986            Bytes::new(&payload_buf)
28987        } else {
28988            Bytes::new(__input)
28989        };
28990        let mut __struct = Self::default();
28991        __struct.capacity_full_specification = buf.get_i32_le()?;
28992        __struct.capacity_full = buf.get_i32_le()?;
28993        __struct.cycle_count = buf.get_u16_le()?;
28994        __struct.weight = buf.get_u16_le()?;
28995        __struct.discharge_minimum_voltage = buf.get_u16_le()?;
28996        __struct.charging_minimum_voltage = buf.get_u16_le()?;
28997        __struct.resting_minimum_voltage = buf.get_u16_le()?;
28998        __struct.id = buf.get_u8()?;
28999        let tmp = buf.get_u8()?;
29000        __struct.battery_function =
29001            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29002                enum_type: "MavBatteryFunction",
29003                value: tmp as u64,
29004            })?;
29005        let tmp = buf.get_u8()?;
29006        __struct.mavtype =
29007            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29008                enum_type: "MavBatteryType",
29009                value: tmp as u64,
29010            })?;
29011        let mut tmp = [0_u8; 16usize];
29012        for v in &mut tmp {
29013            *v = buf.get_u8()?;
29014        }
29015        __struct.serial_number = CharArray::new(tmp);
29016        let mut tmp = [0_u8; 50usize];
29017        for v in &mut tmp {
29018            *v = buf.get_u8()?;
29019        }
29020        __struct.device_name = CharArray::new(tmp);
29021        __struct.charging_maximum_voltage = buf.get_u16_le()?;
29022        __struct.cells_in_series = buf.get_u8()?;
29023        __struct.discharge_maximum_current = buf.get_u32_le()?;
29024        __struct.discharge_maximum_burst_current = buf.get_u32_le()?;
29025        let mut tmp = [0_u8; 11usize];
29026        for v in &mut tmp {
29027            *v = buf.get_u8()?;
29028        }
29029        __struct.manufacture_date = CharArray::new(tmp);
29030        Ok(__struct)
29031    }
29032    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29033        let mut __tmp = BytesMut::new(bytes);
29034        #[allow(clippy::absurd_extreme_comparisons)]
29035        #[allow(unused_comparisons)]
29036        if __tmp.remaining() < Self::ENCODED_LEN {
29037            panic!(
29038                "buffer is too small (need {} bytes, but got {})",
29039                Self::ENCODED_LEN,
29040                __tmp.remaining(),
29041            )
29042        }
29043        __tmp.put_i32_le(self.capacity_full_specification);
29044        __tmp.put_i32_le(self.capacity_full);
29045        __tmp.put_u16_le(self.cycle_count);
29046        __tmp.put_u16_le(self.weight);
29047        __tmp.put_u16_le(self.discharge_minimum_voltage);
29048        __tmp.put_u16_le(self.charging_minimum_voltage);
29049        __tmp.put_u16_le(self.resting_minimum_voltage);
29050        __tmp.put_u8(self.id);
29051        __tmp.put_u8(self.battery_function as u8);
29052        __tmp.put_u8(self.mavtype as u8);
29053        for val in &self.serial_number {
29054            __tmp.put_u8(*val);
29055        }
29056        for val in &self.device_name {
29057            __tmp.put_u8(*val);
29058        }
29059        if matches!(version, MavlinkVersion::V2) {
29060            __tmp.put_u16_le(self.charging_maximum_voltage);
29061            __tmp.put_u8(self.cells_in_series);
29062            __tmp.put_u32_le(self.discharge_maximum_current);
29063            __tmp.put_u32_le(self.discharge_maximum_burst_current);
29064            for val in &self.manufacture_date {
29065                __tmp.put_u8(*val);
29066            }
29067            let len = __tmp.len();
29068            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29069        } else {
29070            __tmp.len()
29071        }
29072    }
29073}
29074#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
29075#[doc = ""]
29076#[doc = "ID: 253"]
29077#[derive(Debug, Clone, PartialEq)]
29078#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29080#[cfg_attr(feature = "ts", derive(TS))]
29081#[cfg_attr(feature = "ts", ts(export))]
29082pub struct STATUSTEXT_DATA {
29083    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
29084    pub severity: MavSeverity,
29085    #[doc = "Status text message, without null termination character"]
29086    #[cfg_attr(feature = "ts", ts(type = "string"))]
29087    pub text: CharArray<50>,
29088    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
29089    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29090    pub id: u16,
29091    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
29092    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29093    pub chunk_seq: u8,
29094}
29095impl STATUSTEXT_DATA {
29096    pub const ENCODED_LEN: usize = 54usize;
29097    pub const DEFAULT: Self = Self {
29098        severity: MavSeverity::DEFAULT,
29099        text: CharArray::new([0_u8; 50usize]),
29100        id: 0_u16,
29101        chunk_seq: 0_u8,
29102    };
29103    #[cfg(feature = "arbitrary")]
29104    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29105        use arbitrary::{Arbitrary, Unstructured};
29106        let mut buf = [0u8; 1024];
29107        rng.fill_bytes(&mut buf);
29108        let mut unstructured = Unstructured::new(&buf);
29109        Self::arbitrary(&mut unstructured).unwrap_or_default()
29110    }
29111}
29112impl Default for STATUSTEXT_DATA {
29113    fn default() -> Self {
29114        Self::DEFAULT.clone()
29115    }
29116}
29117impl MessageData for STATUSTEXT_DATA {
29118    type Message = MavMessage;
29119    const ID: u32 = 253u32;
29120    const NAME: &'static str = "STATUSTEXT";
29121    const EXTRA_CRC: u8 = 83u8;
29122    const ENCODED_LEN: usize = 54usize;
29123    fn deser(
29124        _version: MavlinkVersion,
29125        __input: &[u8],
29126    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29127        let avail_len = __input.len();
29128        let mut payload_buf = [0; Self::ENCODED_LEN];
29129        let mut buf = if avail_len < Self::ENCODED_LEN {
29130            payload_buf[0..avail_len].copy_from_slice(__input);
29131            Bytes::new(&payload_buf)
29132        } else {
29133            Bytes::new(__input)
29134        };
29135        let mut __struct = Self::default();
29136        let tmp = buf.get_u8()?;
29137        __struct.severity =
29138            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29139                enum_type: "MavSeverity",
29140                value: tmp as u64,
29141            })?;
29142        let mut tmp = [0_u8; 50usize];
29143        for v in &mut tmp {
29144            *v = buf.get_u8()?;
29145        }
29146        __struct.text = CharArray::new(tmp);
29147        __struct.id = buf.get_u16_le()?;
29148        __struct.chunk_seq = buf.get_u8()?;
29149        Ok(__struct)
29150    }
29151    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29152        let mut __tmp = BytesMut::new(bytes);
29153        #[allow(clippy::absurd_extreme_comparisons)]
29154        #[allow(unused_comparisons)]
29155        if __tmp.remaining() < Self::ENCODED_LEN {
29156            panic!(
29157                "buffer is too small (need {} bytes, but got {})",
29158                Self::ENCODED_LEN,
29159                __tmp.remaining(),
29160            )
29161        }
29162        __tmp.put_u8(self.severity as u8);
29163        for val in &self.text {
29164            __tmp.put_u8(*val);
29165        }
29166        if matches!(version, MavlinkVersion::V2) {
29167            __tmp.put_u16_le(self.id);
29168            __tmp.put_u8(self.chunk_seq);
29169            let len = __tmp.len();
29170            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29171        } else {
29172            __tmp.len()
29173        }
29174    }
29175}
29176#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
29177#[doc = ""]
29178#[doc = "ID: 261"]
29179#[derive(Debug, Clone, PartialEq)]
29180#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29181#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29182#[cfg_attr(feature = "ts", derive(TS))]
29183#[cfg_attr(feature = "ts", ts(export))]
29184pub struct STORAGE_INFORMATION_DATA {
29185    #[doc = "Timestamp (time since system boot)."]
29186    pub time_boot_ms: u32,
29187    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29188    pub total_capacity: f32,
29189    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29190    pub used_capacity: f32,
29191    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29192    pub available_capacity: f32,
29193    #[doc = "Read speed."]
29194    pub read_speed: f32,
29195    #[doc = "Write speed."]
29196    pub write_speed: f32,
29197    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
29198    pub storage_id: u8,
29199    #[doc = "Number of storage devices"]
29200    pub storage_count: u8,
29201    #[doc = "Status of storage"]
29202    pub status: StorageStatus,
29203    #[doc = "Type of storage"]
29204    #[cfg_attr(feature = "serde", serde(default))]
29205    pub mavtype: StorageType,
29206    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
29207    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29208    #[cfg_attr(feature = "ts", ts(type = "string"))]
29209    pub name: CharArray<32>,
29210    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
29211    #[cfg_attr(feature = "serde", serde(default))]
29212    pub storage_usage: StorageUsageFlag,
29213}
29214impl STORAGE_INFORMATION_DATA {
29215    pub const ENCODED_LEN: usize = 61usize;
29216    pub const DEFAULT: Self = Self {
29217        time_boot_ms: 0_u32,
29218        total_capacity: 0.0_f32,
29219        used_capacity: 0.0_f32,
29220        available_capacity: 0.0_f32,
29221        read_speed: 0.0_f32,
29222        write_speed: 0.0_f32,
29223        storage_id: 0_u8,
29224        storage_count: 0_u8,
29225        status: StorageStatus::DEFAULT,
29226        mavtype: StorageType::DEFAULT,
29227        name: CharArray::new([0_u8; 32usize]),
29228        storage_usage: StorageUsageFlag::DEFAULT,
29229    };
29230    #[cfg(feature = "arbitrary")]
29231    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29232        use arbitrary::{Arbitrary, Unstructured};
29233        let mut buf = [0u8; 1024];
29234        rng.fill_bytes(&mut buf);
29235        let mut unstructured = Unstructured::new(&buf);
29236        Self::arbitrary(&mut unstructured).unwrap_or_default()
29237    }
29238}
29239impl Default for STORAGE_INFORMATION_DATA {
29240    fn default() -> Self {
29241        Self::DEFAULT.clone()
29242    }
29243}
29244impl MessageData for STORAGE_INFORMATION_DATA {
29245    type Message = MavMessage;
29246    const ID: u32 = 261u32;
29247    const NAME: &'static str = "STORAGE_INFORMATION";
29248    const EXTRA_CRC: u8 = 179u8;
29249    const ENCODED_LEN: usize = 61usize;
29250    fn deser(
29251        _version: MavlinkVersion,
29252        __input: &[u8],
29253    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29254        let avail_len = __input.len();
29255        let mut payload_buf = [0; Self::ENCODED_LEN];
29256        let mut buf = if avail_len < Self::ENCODED_LEN {
29257            payload_buf[0..avail_len].copy_from_slice(__input);
29258            Bytes::new(&payload_buf)
29259        } else {
29260            Bytes::new(__input)
29261        };
29262        let mut __struct = Self::default();
29263        __struct.time_boot_ms = buf.get_u32_le()?;
29264        __struct.total_capacity = buf.get_f32_le()?;
29265        __struct.used_capacity = buf.get_f32_le()?;
29266        __struct.available_capacity = buf.get_f32_le()?;
29267        __struct.read_speed = buf.get_f32_le()?;
29268        __struct.write_speed = buf.get_f32_le()?;
29269        __struct.storage_id = buf.get_u8()?;
29270        __struct.storage_count = buf.get_u8()?;
29271        let tmp = buf.get_u8()?;
29272        __struct.status =
29273            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29274                enum_type: "StorageStatus",
29275                value: tmp as u64,
29276            })?;
29277        let tmp = buf.get_u8()?;
29278        __struct.mavtype =
29279            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29280                enum_type: "StorageType",
29281                value: tmp as u64,
29282            })?;
29283        let mut tmp = [0_u8; 32usize];
29284        for v in &mut tmp {
29285            *v = buf.get_u8()?;
29286        }
29287        __struct.name = CharArray::new(tmp);
29288        let tmp = buf.get_u8()?;
29289        __struct.storage_usage = StorageUsageFlag::from_bits(
29290            tmp as <StorageUsageFlag as Flags>::Bits,
29291        )
29292        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29293            flag_type: "StorageUsageFlag",
29294            value: tmp as u64,
29295        })?;
29296        Ok(__struct)
29297    }
29298    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29299        let mut __tmp = BytesMut::new(bytes);
29300        #[allow(clippy::absurd_extreme_comparisons)]
29301        #[allow(unused_comparisons)]
29302        if __tmp.remaining() < Self::ENCODED_LEN {
29303            panic!(
29304                "buffer is too small (need {} bytes, but got {})",
29305                Self::ENCODED_LEN,
29306                __tmp.remaining(),
29307            )
29308        }
29309        __tmp.put_u32_le(self.time_boot_ms);
29310        __tmp.put_f32_le(self.total_capacity);
29311        __tmp.put_f32_le(self.used_capacity);
29312        __tmp.put_f32_le(self.available_capacity);
29313        __tmp.put_f32_le(self.read_speed);
29314        __tmp.put_f32_le(self.write_speed);
29315        __tmp.put_u8(self.storage_id);
29316        __tmp.put_u8(self.storage_count);
29317        __tmp.put_u8(self.status as u8);
29318        if matches!(version, MavlinkVersion::V2) {
29319            __tmp.put_u8(self.mavtype as u8);
29320            for val in &self.name {
29321                __tmp.put_u8(*val);
29322            }
29323            __tmp.put_u8(self.storage_usage.bits() as u8);
29324            let len = __tmp.len();
29325            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29326        } else {
29327            __tmp.len()
29328        }
29329    }
29330}
29331#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
29332#[doc = ""]
29333#[doc = "ID: 401"]
29334#[derive(Debug, Clone, PartialEq)]
29335#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29336#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29337#[cfg_attr(feature = "ts", derive(TS))]
29338#[cfg_attr(feature = "ts", ts(export))]
29339pub struct SUPPORTED_TUNES_DATA {
29340    #[doc = "Bitfield of supported tune formats."]
29341    pub format: TuneFormat,
29342    #[doc = "System ID"]
29343    pub target_system: u8,
29344    #[doc = "Component ID"]
29345    pub target_component: u8,
29346}
29347impl SUPPORTED_TUNES_DATA {
29348    pub const ENCODED_LEN: usize = 6usize;
29349    pub const DEFAULT: Self = Self {
29350        format: TuneFormat::DEFAULT,
29351        target_system: 0_u8,
29352        target_component: 0_u8,
29353    };
29354    #[cfg(feature = "arbitrary")]
29355    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29356        use arbitrary::{Arbitrary, Unstructured};
29357        let mut buf = [0u8; 1024];
29358        rng.fill_bytes(&mut buf);
29359        let mut unstructured = Unstructured::new(&buf);
29360        Self::arbitrary(&mut unstructured).unwrap_or_default()
29361    }
29362}
29363impl Default for SUPPORTED_TUNES_DATA {
29364    fn default() -> Self {
29365        Self::DEFAULT.clone()
29366    }
29367}
29368impl MessageData for SUPPORTED_TUNES_DATA {
29369    type Message = MavMessage;
29370    const ID: u32 = 401u32;
29371    const NAME: &'static str = "SUPPORTED_TUNES";
29372    const EXTRA_CRC: u8 = 183u8;
29373    const ENCODED_LEN: usize = 6usize;
29374    fn deser(
29375        _version: MavlinkVersion,
29376        __input: &[u8],
29377    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29378        let avail_len = __input.len();
29379        let mut payload_buf = [0; Self::ENCODED_LEN];
29380        let mut buf = if avail_len < Self::ENCODED_LEN {
29381            payload_buf[0..avail_len].copy_from_slice(__input);
29382            Bytes::new(&payload_buf)
29383        } else {
29384            Bytes::new(__input)
29385        };
29386        let mut __struct = Self::default();
29387        let tmp = buf.get_u32_le()?;
29388        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
29389            ::mavlink_core::error::ParserError::InvalidEnum {
29390                enum_type: "TuneFormat",
29391                value: tmp as u64,
29392            },
29393        )?;
29394        __struct.target_system = buf.get_u8()?;
29395        __struct.target_component = buf.get_u8()?;
29396        Ok(__struct)
29397    }
29398    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29399        let mut __tmp = BytesMut::new(bytes);
29400        #[allow(clippy::absurd_extreme_comparisons)]
29401        #[allow(unused_comparisons)]
29402        if __tmp.remaining() < Self::ENCODED_LEN {
29403            panic!(
29404                "buffer is too small (need {} bytes, but got {})",
29405                Self::ENCODED_LEN,
29406                __tmp.remaining(),
29407            )
29408        }
29409        __tmp.put_u32_le(self.format as u32);
29410        __tmp.put_u8(self.target_system);
29411        __tmp.put_u8(self.target_component);
29412        if matches!(version, MavlinkVersion::V2) {
29413            let len = __tmp.len();
29414            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29415        } else {
29416            __tmp.len()
29417        }
29418    }
29419}
29420#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
29421#[doc = ""]
29422#[doc = "ID: 2"]
29423#[derive(Debug, Clone, PartialEq)]
29424#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29426#[cfg_attr(feature = "ts", derive(TS))]
29427#[cfg_attr(feature = "ts", ts(export))]
29428pub struct SYSTEM_TIME_DATA {
29429    #[doc = "Timestamp (UNIX epoch time)."]
29430    pub time_unix_usec: u64,
29431    #[doc = "Timestamp (time since system boot)."]
29432    pub time_boot_ms: u32,
29433}
29434impl SYSTEM_TIME_DATA {
29435    pub const ENCODED_LEN: usize = 12usize;
29436    pub const DEFAULT: Self = Self {
29437        time_unix_usec: 0_u64,
29438        time_boot_ms: 0_u32,
29439    };
29440    #[cfg(feature = "arbitrary")]
29441    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29442        use arbitrary::{Arbitrary, Unstructured};
29443        let mut buf = [0u8; 1024];
29444        rng.fill_bytes(&mut buf);
29445        let mut unstructured = Unstructured::new(&buf);
29446        Self::arbitrary(&mut unstructured).unwrap_or_default()
29447    }
29448}
29449impl Default for SYSTEM_TIME_DATA {
29450    fn default() -> Self {
29451        Self::DEFAULT.clone()
29452    }
29453}
29454impl MessageData for SYSTEM_TIME_DATA {
29455    type Message = MavMessage;
29456    const ID: u32 = 2u32;
29457    const NAME: &'static str = "SYSTEM_TIME";
29458    const EXTRA_CRC: u8 = 137u8;
29459    const ENCODED_LEN: usize = 12usize;
29460    fn deser(
29461        _version: MavlinkVersion,
29462        __input: &[u8],
29463    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29464        let avail_len = __input.len();
29465        let mut payload_buf = [0; Self::ENCODED_LEN];
29466        let mut buf = if avail_len < Self::ENCODED_LEN {
29467            payload_buf[0..avail_len].copy_from_slice(__input);
29468            Bytes::new(&payload_buf)
29469        } else {
29470            Bytes::new(__input)
29471        };
29472        let mut __struct = Self::default();
29473        __struct.time_unix_usec = buf.get_u64_le()?;
29474        __struct.time_boot_ms = buf.get_u32_le()?;
29475        Ok(__struct)
29476    }
29477    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29478        let mut __tmp = BytesMut::new(bytes);
29479        #[allow(clippy::absurd_extreme_comparisons)]
29480        #[allow(unused_comparisons)]
29481        if __tmp.remaining() < Self::ENCODED_LEN {
29482            panic!(
29483                "buffer is too small (need {} bytes, but got {})",
29484                Self::ENCODED_LEN,
29485                __tmp.remaining(),
29486            )
29487        }
29488        __tmp.put_u64_le(self.time_unix_usec);
29489        __tmp.put_u32_le(self.time_boot_ms);
29490        if matches!(version, MavlinkVersion::V2) {
29491            let len = __tmp.len();
29492            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29493        } else {
29494            __tmp.len()
29495        }
29496    }
29497}
29498#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
29499#[doc = ""]
29500#[doc = "ID: 1"]
29501#[derive(Debug, Clone, PartialEq)]
29502#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29503#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29504#[cfg_attr(feature = "ts", derive(TS))]
29505#[cfg_attr(feature = "ts", ts(export))]
29506pub struct SYS_STATUS_DATA {
29507    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29508    pub onboard_control_sensors_present: MavSysStatusSensor,
29509    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29510    pub onboard_control_sensors_enabled: MavSysStatusSensor,
29511    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29512    pub onboard_control_sensors_health: MavSysStatusSensor,
29513    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
29514    pub load: u16,
29515    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
29516    pub voltage_battery: u16,
29517    #[doc = "Battery current, -1: Current not sent by autopilot"]
29518    pub current_battery: i16,
29519    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29520    pub drop_rate_comm: u16,
29521    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29522    pub errors_comm: u16,
29523    #[doc = "Autopilot-specific errors"]
29524    pub errors_count1: u16,
29525    #[doc = "Autopilot-specific errors"]
29526    pub errors_count2: u16,
29527    #[doc = "Autopilot-specific errors"]
29528    pub errors_count3: u16,
29529    #[doc = "Autopilot-specific errors"]
29530    pub errors_count4: u16,
29531    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
29532    pub battery_remaining: i8,
29533    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29534    #[cfg_attr(feature = "serde", serde(default))]
29535    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
29536    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29537    #[cfg_attr(feature = "serde", serde(default))]
29538    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
29539    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29540    #[cfg_attr(feature = "serde", serde(default))]
29541    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
29542}
29543impl SYS_STATUS_DATA {
29544    pub const ENCODED_LEN: usize = 43usize;
29545    pub const DEFAULT: Self = Self {
29546        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
29547        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
29548        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
29549        load: 0_u16,
29550        voltage_battery: 0_u16,
29551        current_battery: 0_i16,
29552        drop_rate_comm: 0_u16,
29553        errors_comm: 0_u16,
29554        errors_count1: 0_u16,
29555        errors_count2: 0_u16,
29556        errors_count3: 0_u16,
29557        errors_count4: 0_u16,
29558        battery_remaining: 0_i8,
29559        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
29560        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
29561        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
29562    };
29563    #[cfg(feature = "arbitrary")]
29564    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29565        use arbitrary::{Arbitrary, Unstructured};
29566        let mut buf = [0u8; 1024];
29567        rng.fill_bytes(&mut buf);
29568        let mut unstructured = Unstructured::new(&buf);
29569        Self::arbitrary(&mut unstructured).unwrap_or_default()
29570    }
29571}
29572impl Default for SYS_STATUS_DATA {
29573    fn default() -> Self {
29574        Self::DEFAULT.clone()
29575    }
29576}
29577impl MessageData for SYS_STATUS_DATA {
29578    type Message = MavMessage;
29579    const ID: u32 = 1u32;
29580    const NAME: &'static str = "SYS_STATUS";
29581    const EXTRA_CRC: u8 = 124u8;
29582    const ENCODED_LEN: usize = 43usize;
29583    fn deser(
29584        _version: MavlinkVersion,
29585        __input: &[u8],
29586    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29587        let avail_len = __input.len();
29588        let mut payload_buf = [0; Self::ENCODED_LEN];
29589        let mut buf = if avail_len < Self::ENCODED_LEN {
29590            payload_buf[0..avail_len].copy_from_slice(__input);
29591            Bytes::new(&payload_buf)
29592        } else {
29593            Bytes::new(__input)
29594        };
29595        let mut __struct = Self::default();
29596        let tmp = buf.get_u32_le()?;
29597        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
29598            tmp as <MavSysStatusSensor as Flags>::Bits,
29599        )
29600        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29601            flag_type: "MavSysStatusSensor",
29602            value: tmp as u64,
29603        })?;
29604        let tmp = buf.get_u32_le()?;
29605        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
29606            tmp as <MavSysStatusSensor as Flags>::Bits,
29607        )
29608        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29609            flag_type: "MavSysStatusSensor",
29610            value: tmp as u64,
29611        })?;
29612        let tmp = buf.get_u32_le()?;
29613        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
29614            tmp as <MavSysStatusSensor as Flags>::Bits,
29615        )
29616        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29617            flag_type: "MavSysStatusSensor",
29618            value: tmp as u64,
29619        })?;
29620        __struct.load = buf.get_u16_le()?;
29621        __struct.voltage_battery = buf.get_u16_le()?;
29622        __struct.current_battery = buf.get_i16_le()?;
29623        __struct.drop_rate_comm = buf.get_u16_le()?;
29624        __struct.errors_comm = buf.get_u16_le()?;
29625        __struct.errors_count1 = buf.get_u16_le()?;
29626        __struct.errors_count2 = buf.get_u16_le()?;
29627        __struct.errors_count3 = buf.get_u16_le()?;
29628        __struct.errors_count4 = buf.get_u16_le()?;
29629        __struct.battery_remaining = buf.get_i8()?;
29630        let tmp = buf.get_u32_le()?;
29631        __struct.onboard_control_sensors_present_extended = MavSysStatusSensorExtended::from_bits(
29632            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29633        )
29634        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29635            flag_type: "MavSysStatusSensorExtended",
29636            value: tmp as u64,
29637        })?;
29638        let tmp = buf.get_u32_le()?;
29639        __struct.onboard_control_sensors_enabled_extended = MavSysStatusSensorExtended::from_bits(
29640            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29641        )
29642        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29643            flag_type: "MavSysStatusSensorExtended",
29644            value: tmp as u64,
29645        })?;
29646        let tmp = buf.get_u32_le()?;
29647        __struct.onboard_control_sensors_health_extended = MavSysStatusSensorExtended::from_bits(
29648            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29649        )
29650        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29651            flag_type: "MavSysStatusSensorExtended",
29652            value: tmp as u64,
29653        })?;
29654        Ok(__struct)
29655    }
29656    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29657        let mut __tmp = BytesMut::new(bytes);
29658        #[allow(clippy::absurd_extreme_comparisons)]
29659        #[allow(unused_comparisons)]
29660        if __tmp.remaining() < Self::ENCODED_LEN {
29661            panic!(
29662                "buffer is too small (need {} bytes, but got {})",
29663                Self::ENCODED_LEN,
29664                __tmp.remaining(),
29665            )
29666        }
29667        __tmp.put_u32_le(self.onboard_control_sensors_present.bits() as u32);
29668        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits() as u32);
29669        __tmp.put_u32_le(self.onboard_control_sensors_health.bits() as u32);
29670        __tmp.put_u16_le(self.load);
29671        __tmp.put_u16_le(self.voltage_battery);
29672        __tmp.put_i16_le(self.current_battery);
29673        __tmp.put_u16_le(self.drop_rate_comm);
29674        __tmp.put_u16_le(self.errors_comm);
29675        __tmp.put_u16_le(self.errors_count1);
29676        __tmp.put_u16_le(self.errors_count2);
29677        __tmp.put_u16_le(self.errors_count3);
29678        __tmp.put_u16_le(self.errors_count4);
29679        __tmp.put_i8(self.battery_remaining);
29680        if matches!(version, MavlinkVersion::V2) {
29681            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits() as u32);
29682            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits() as u32);
29683            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits() as u32);
29684            let len = __tmp.len();
29685            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29686        } else {
29687            __tmp.len()
29688        }
29689    }
29690}
29691#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
29692#[doc = ""]
29693#[doc = "ID: 135"]
29694#[derive(Debug, Clone, PartialEq)]
29695#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29696#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29697#[cfg_attr(feature = "ts", derive(TS))]
29698#[cfg_attr(feature = "ts", ts(export))]
29699pub struct TERRAIN_CHECK_DATA {
29700    #[doc = "Latitude"]
29701    pub lat: i32,
29702    #[doc = "Longitude"]
29703    pub lon: i32,
29704}
29705impl TERRAIN_CHECK_DATA {
29706    pub const ENCODED_LEN: usize = 8usize;
29707    pub const DEFAULT: Self = Self {
29708        lat: 0_i32,
29709        lon: 0_i32,
29710    };
29711    #[cfg(feature = "arbitrary")]
29712    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29713        use arbitrary::{Arbitrary, Unstructured};
29714        let mut buf = [0u8; 1024];
29715        rng.fill_bytes(&mut buf);
29716        let mut unstructured = Unstructured::new(&buf);
29717        Self::arbitrary(&mut unstructured).unwrap_or_default()
29718    }
29719}
29720impl Default for TERRAIN_CHECK_DATA {
29721    fn default() -> Self {
29722        Self::DEFAULT.clone()
29723    }
29724}
29725impl MessageData for TERRAIN_CHECK_DATA {
29726    type Message = MavMessage;
29727    const ID: u32 = 135u32;
29728    const NAME: &'static str = "TERRAIN_CHECK";
29729    const EXTRA_CRC: u8 = 203u8;
29730    const ENCODED_LEN: usize = 8usize;
29731    fn deser(
29732        _version: MavlinkVersion,
29733        __input: &[u8],
29734    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29735        let avail_len = __input.len();
29736        let mut payload_buf = [0; Self::ENCODED_LEN];
29737        let mut buf = if avail_len < Self::ENCODED_LEN {
29738            payload_buf[0..avail_len].copy_from_slice(__input);
29739            Bytes::new(&payload_buf)
29740        } else {
29741            Bytes::new(__input)
29742        };
29743        let mut __struct = Self::default();
29744        __struct.lat = buf.get_i32_le()?;
29745        __struct.lon = buf.get_i32_le()?;
29746        Ok(__struct)
29747    }
29748    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29749        let mut __tmp = BytesMut::new(bytes);
29750        #[allow(clippy::absurd_extreme_comparisons)]
29751        #[allow(unused_comparisons)]
29752        if __tmp.remaining() < Self::ENCODED_LEN {
29753            panic!(
29754                "buffer is too small (need {} bytes, but got {})",
29755                Self::ENCODED_LEN,
29756                __tmp.remaining(),
29757            )
29758        }
29759        __tmp.put_i32_le(self.lat);
29760        __tmp.put_i32_le(self.lon);
29761        if matches!(version, MavlinkVersion::V2) {
29762            let len = __tmp.len();
29763            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29764        } else {
29765            __tmp.len()
29766        }
29767    }
29768}
29769#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29770#[doc = ""]
29771#[doc = "ID: 134"]
29772#[derive(Debug, Clone, PartialEq)]
29773#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29774#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29775#[cfg_attr(feature = "ts", derive(TS))]
29776#[cfg_attr(feature = "ts", ts(export))]
29777pub struct TERRAIN_DATA_DATA {
29778    #[doc = "Latitude of SW corner of first grid"]
29779    pub lat: i32,
29780    #[doc = "Longitude of SW corner of first grid"]
29781    pub lon: i32,
29782    #[doc = "Grid spacing"]
29783    pub grid_spacing: u16,
29784    #[doc = "Terrain data MSL"]
29785    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29786    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29787    pub data: [i16; 16],
29788    #[doc = "bit within the terrain request mask"]
29789    pub gridbit: u8,
29790}
29791impl TERRAIN_DATA_DATA {
29792    pub const ENCODED_LEN: usize = 43usize;
29793    pub const DEFAULT: Self = Self {
29794        lat: 0_i32,
29795        lon: 0_i32,
29796        grid_spacing: 0_u16,
29797        data: [0_i16; 16usize],
29798        gridbit: 0_u8,
29799    };
29800    #[cfg(feature = "arbitrary")]
29801    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29802        use arbitrary::{Arbitrary, Unstructured};
29803        let mut buf = [0u8; 1024];
29804        rng.fill_bytes(&mut buf);
29805        let mut unstructured = Unstructured::new(&buf);
29806        Self::arbitrary(&mut unstructured).unwrap_or_default()
29807    }
29808}
29809impl Default for TERRAIN_DATA_DATA {
29810    fn default() -> Self {
29811        Self::DEFAULT.clone()
29812    }
29813}
29814impl MessageData for TERRAIN_DATA_DATA {
29815    type Message = MavMessage;
29816    const ID: u32 = 134u32;
29817    const NAME: &'static str = "TERRAIN_DATA";
29818    const EXTRA_CRC: u8 = 229u8;
29819    const ENCODED_LEN: usize = 43usize;
29820    fn deser(
29821        _version: MavlinkVersion,
29822        __input: &[u8],
29823    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29824        let avail_len = __input.len();
29825        let mut payload_buf = [0; Self::ENCODED_LEN];
29826        let mut buf = if avail_len < Self::ENCODED_LEN {
29827            payload_buf[0..avail_len].copy_from_slice(__input);
29828            Bytes::new(&payload_buf)
29829        } else {
29830            Bytes::new(__input)
29831        };
29832        let mut __struct = Self::default();
29833        __struct.lat = buf.get_i32_le()?;
29834        __struct.lon = buf.get_i32_le()?;
29835        __struct.grid_spacing = buf.get_u16_le()?;
29836        for v in &mut __struct.data {
29837            let val = buf.get_i16_le()?;
29838            *v = val;
29839        }
29840        __struct.gridbit = buf.get_u8()?;
29841        Ok(__struct)
29842    }
29843    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29844        let mut __tmp = BytesMut::new(bytes);
29845        #[allow(clippy::absurd_extreme_comparisons)]
29846        #[allow(unused_comparisons)]
29847        if __tmp.remaining() < Self::ENCODED_LEN {
29848            panic!(
29849                "buffer is too small (need {} bytes, but got {})",
29850                Self::ENCODED_LEN,
29851                __tmp.remaining(),
29852            )
29853        }
29854        __tmp.put_i32_le(self.lat);
29855        __tmp.put_i32_le(self.lon);
29856        __tmp.put_u16_le(self.grid_spacing);
29857        for val in &self.data {
29858            __tmp.put_i16_le(*val);
29859        }
29860        __tmp.put_u8(self.gridbit);
29861        if matches!(version, MavlinkVersion::V2) {
29862            let len = __tmp.len();
29863            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29864        } else {
29865            __tmp.len()
29866        }
29867    }
29868}
29869#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29870#[doc = ""]
29871#[doc = "ID: 136"]
29872#[derive(Debug, Clone, PartialEq)]
29873#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29874#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29875#[cfg_attr(feature = "ts", derive(TS))]
29876#[cfg_attr(feature = "ts", ts(export))]
29877pub struct TERRAIN_REPORT_DATA {
29878    #[doc = "Latitude"]
29879    pub lat: i32,
29880    #[doc = "Longitude"]
29881    pub lon: i32,
29882    #[doc = "Terrain height MSL"]
29883    pub terrain_height: f32,
29884    #[doc = "Current vehicle height above lat/lon terrain height"]
29885    pub current_height: f32,
29886    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
29887    pub spacing: u16,
29888    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
29889    pub pending: u16,
29890    #[doc = "Number of 4x4 terrain blocks in memory"]
29891    pub loaded: u16,
29892}
29893impl TERRAIN_REPORT_DATA {
29894    pub const ENCODED_LEN: usize = 22usize;
29895    pub const DEFAULT: Self = Self {
29896        lat: 0_i32,
29897        lon: 0_i32,
29898        terrain_height: 0.0_f32,
29899        current_height: 0.0_f32,
29900        spacing: 0_u16,
29901        pending: 0_u16,
29902        loaded: 0_u16,
29903    };
29904    #[cfg(feature = "arbitrary")]
29905    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29906        use arbitrary::{Arbitrary, Unstructured};
29907        let mut buf = [0u8; 1024];
29908        rng.fill_bytes(&mut buf);
29909        let mut unstructured = Unstructured::new(&buf);
29910        Self::arbitrary(&mut unstructured).unwrap_or_default()
29911    }
29912}
29913impl Default for TERRAIN_REPORT_DATA {
29914    fn default() -> Self {
29915        Self::DEFAULT.clone()
29916    }
29917}
29918impl MessageData for TERRAIN_REPORT_DATA {
29919    type Message = MavMessage;
29920    const ID: u32 = 136u32;
29921    const NAME: &'static str = "TERRAIN_REPORT";
29922    const EXTRA_CRC: u8 = 1u8;
29923    const ENCODED_LEN: usize = 22usize;
29924    fn deser(
29925        _version: MavlinkVersion,
29926        __input: &[u8],
29927    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29928        let avail_len = __input.len();
29929        let mut payload_buf = [0; Self::ENCODED_LEN];
29930        let mut buf = if avail_len < Self::ENCODED_LEN {
29931            payload_buf[0..avail_len].copy_from_slice(__input);
29932            Bytes::new(&payload_buf)
29933        } else {
29934            Bytes::new(__input)
29935        };
29936        let mut __struct = Self::default();
29937        __struct.lat = buf.get_i32_le()?;
29938        __struct.lon = buf.get_i32_le()?;
29939        __struct.terrain_height = buf.get_f32_le()?;
29940        __struct.current_height = buf.get_f32_le()?;
29941        __struct.spacing = buf.get_u16_le()?;
29942        __struct.pending = buf.get_u16_le()?;
29943        __struct.loaded = buf.get_u16_le()?;
29944        Ok(__struct)
29945    }
29946    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29947        let mut __tmp = BytesMut::new(bytes);
29948        #[allow(clippy::absurd_extreme_comparisons)]
29949        #[allow(unused_comparisons)]
29950        if __tmp.remaining() < Self::ENCODED_LEN {
29951            panic!(
29952                "buffer is too small (need {} bytes, but got {})",
29953                Self::ENCODED_LEN,
29954                __tmp.remaining(),
29955            )
29956        }
29957        __tmp.put_i32_le(self.lat);
29958        __tmp.put_i32_le(self.lon);
29959        __tmp.put_f32_le(self.terrain_height);
29960        __tmp.put_f32_le(self.current_height);
29961        __tmp.put_u16_le(self.spacing);
29962        __tmp.put_u16_le(self.pending);
29963        __tmp.put_u16_le(self.loaded);
29964        if matches!(version, MavlinkVersion::V2) {
29965            let len = __tmp.len();
29966            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29967        } else {
29968            __tmp.len()
29969        }
29970    }
29971}
29972#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29973#[doc = ""]
29974#[doc = "ID: 133"]
29975#[derive(Debug, Clone, PartialEq)]
29976#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29977#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29978#[cfg_attr(feature = "ts", derive(TS))]
29979#[cfg_attr(feature = "ts", ts(export))]
29980pub struct TERRAIN_REQUEST_DATA {
29981    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
29982    pub mask: u64,
29983    #[doc = "Latitude of SW corner of first grid"]
29984    pub lat: i32,
29985    #[doc = "Longitude of SW corner of first grid"]
29986    pub lon: i32,
29987    #[doc = "Grid spacing"]
29988    pub grid_spacing: u16,
29989}
29990impl TERRAIN_REQUEST_DATA {
29991    pub const ENCODED_LEN: usize = 18usize;
29992    pub const DEFAULT: Self = Self {
29993        mask: 0_u64,
29994        lat: 0_i32,
29995        lon: 0_i32,
29996        grid_spacing: 0_u16,
29997    };
29998    #[cfg(feature = "arbitrary")]
29999    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30000        use arbitrary::{Arbitrary, Unstructured};
30001        let mut buf = [0u8; 1024];
30002        rng.fill_bytes(&mut buf);
30003        let mut unstructured = Unstructured::new(&buf);
30004        Self::arbitrary(&mut unstructured).unwrap_or_default()
30005    }
30006}
30007impl Default for TERRAIN_REQUEST_DATA {
30008    fn default() -> Self {
30009        Self::DEFAULT.clone()
30010    }
30011}
30012impl MessageData for TERRAIN_REQUEST_DATA {
30013    type Message = MavMessage;
30014    const ID: u32 = 133u32;
30015    const NAME: &'static str = "TERRAIN_REQUEST";
30016    const EXTRA_CRC: u8 = 6u8;
30017    const ENCODED_LEN: usize = 18usize;
30018    fn deser(
30019        _version: MavlinkVersion,
30020        __input: &[u8],
30021    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30022        let avail_len = __input.len();
30023        let mut payload_buf = [0; Self::ENCODED_LEN];
30024        let mut buf = if avail_len < Self::ENCODED_LEN {
30025            payload_buf[0..avail_len].copy_from_slice(__input);
30026            Bytes::new(&payload_buf)
30027        } else {
30028            Bytes::new(__input)
30029        };
30030        let mut __struct = Self::default();
30031        __struct.mask = buf.get_u64_le()?;
30032        __struct.lat = buf.get_i32_le()?;
30033        __struct.lon = buf.get_i32_le()?;
30034        __struct.grid_spacing = buf.get_u16_le()?;
30035        Ok(__struct)
30036    }
30037    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30038        let mut __tmp = BytesMut::new(bytes);
30039        #[allow(clippy::absurd_extreme_comparisons)]
30040        #[allow(unused_comparisons)]
30041        if __tmp.remaining() < Self::ENCODED_LEN {
30042            panic!(
30043                "buffer is too small (need {} bytes, but got {})",
30044                Self::ENCODED_LEN,
30045                __tmp.remaining(),
30046            )
30047        }
30048        __tmp.put_u64_le(self.mask);
30049        __tmp.put_i32_le(self.lat);
30050        __tmp.put_i32_le(self.lon);
30051        __tmp.put_u16_le(self.grid_spacing);
30052        if matches!(version, MavlinkVersion::V2) {
30053            let len = __tmp.len();
30054            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30055        } else {
30056            __tmp.len()
30057        }
30058    }
30059}
30060#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
30061#[doc = ""]
30062#[doc = "ID: 111"]
30063#[derive(Debug, Clone, PartialEq)]
30064#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30065#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30066#[cfg_attr(feature = "ts", derive(TS))]
30067#[cfg_attr(feature = "ts", ts(export))]
30068pub struct TIMESYNC_DATA {
30069    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
30070    pub tc1: i64,
30071    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
30072    pub ts1: i64,
30073    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
30074    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30075    pub target_system: u8,
30076    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
30077    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30078    pub target_component: u8,
30079}
30080impl TIMESYNC_DATA {
30081    pub const ENCODED_LEN: usize = 18usize;
30082    pub const DEFAULT: Self = Self {
30083        tc1: 0_i64,
30084        ts1: 0_i64,
30085        target_system: 0_u8,
30086        target_component: 0_u8,
30087    };
30088    #[cfg(feature = "arbitrary")]
30089    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30090        use arbitrary::{Arbitrary, Unstructured};
30091        let mut buf = [0u8; 1024];
30092        rng.fill_bytes(&mut buf);
30093        let mut unstructured = Unstructured::new(&buf);
30094        Self::arbitrary(&mut unstructured).unwrap_or_default()
30095    }
30096}
30097impl Default for TIMESYNC_DATA {
30098    fn default() -> Self {
30099        Self::DEFAULT.clone()
30100    }
30101}
30102impl MessageData for TIMESYNC_DATA {
30103    type Message = MavMessage;
30104    const ID: u32 = 111u32;
30105    const NAME: &'static str = "TIMESYNC";
30106    const EXTRA_CRC: u8 = 34u8;
30107    const ENCODED_LEN: usize = 18usize;
30108    fn deser(
30109        _version: MavlinkVersion,
30110        __input: &[u8],
30111    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30112        let avail_len = __input.len();
30113        let mut payload_buf = [0; Self::ENCODED_LEN];
30114        let mut buf = if avail_len < Self::ENCODED_LEN {
30115            payload_buf[0..avail_len].copy_from_slice(__input);
30116            Bytes::new(&payload_buf)
30117        } else {
30118            Bytes::new(__input)
30119        };
30120        let mut __struct = Self::default();
30121        __struct.tc1 = buf.get_i64_le()?;
30122        __struct.ts1 = buf.get_i64_le()?;
30123        __struct.target_system = buf.get_u8()?;
30124        __struct.target_component = buf.get_u8()?;
30125        Ok(__struct)
30126    }
30127    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30128        let mut __tmp = BytesMut::new(bytes);
30129        #[allow(clippy::absurd_extreme_comparisons)]
30130        #[allow(unused_comparisons)]
30131        if __tmp.remaining() < Self::ENCODED_LEN {
30132            panic!(
30133                "buffer is too small (need {} bytes, but got {})",
30134                Self::ENCODED_LEN,
30135                __tmp.remaining(),
30136            )
30137        }
30138        __tmp.put_i64_le(self.tc1);
30139        __tmp.put_i64_le(self.ts1);
30140        if matches!(version, MavlinkVersion::V2) {
30141            __tmp.put_u8(self.target_system);
30142            __tmp.put_u8(self.target_component);
30143            let len = __tmp.len();
30144            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30145        } else {
30146            __tmp.len()
30147        }
30148    }
30149}
30150#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
30151#[doc = ""]
30152#[doc = "ID: 380"]
30153#[derive(Debug, Clone, PartialEq)]
30154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30155#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30156#[cfg_attr(feature = "ts", derive(TS))]
30157#[cfg_attr(feature = "ts", ts(export))]
30158pub struct TIME_ESTIMATE_TO_TARGET_DATA {
30159    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
30160    pub safe_return: i32,
30161    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
30162    pub land: i32,
30163    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
30164    pub mission_next_item: i32,
30165    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
30166    pub mission_end: i32,
30167    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
30168    pub commanded_action: i32,
30169}
30170impl TIME_ESTIMATE_TO_TARGET_DATA {
30171    pub const ENCODED_LEN: usize = 20usize;
30172    pub const DEFAULT: Self = Self {
30173        safe_return: 0_i32,
30174        land: 0_i32,
30175        mission_next_item: 0_i32,
30176        mission_end: 0_i32,
30177        commanded_action: 0_i32,
30178    };
30179    #[cfg(feature = "arbitrary")]
30180    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30181        use arbitrary::{Arbitrary, Unstructured};
30182        let mut buf = [0u8; 1024];
30183        rng.fill_bytes(&mut buf);
30184        let mut unstructured = Unstructured::new(&buf);
30185        Self::arbitrary(&mut unstructured).unwrap_or_default()
30186    }
30187}
30188impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
30189    fn default() -> Self {
30190        Self::DEFAULT.clone()
30191    }
30192}
30193impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
30194    type Message = MavMessage;
30195    const ID: u32 = 380u32;
30196    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
30197    const EXTRA_CRC: u8 = 232u8;
30198    const ENCODED_LEN: usize = 20usize;
30199    fn deser(
30200        _version: MavlinkVersion,
30201        __input: &[u8],
30202    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30203        let avail_len = __input.len();
30204        let mut payload_buf = [0; Self::ENCODED_LEN];
30205        let mut buf = if avail_len < Self::ENCODED_LEN {
30206            payload_buf[0..avail_len].copy_from_slice(__input);
30207            Bytes::new(&payload_buf)
30208        } else {
30209            Bytes::new(__input)
30210        };
30211        let mut __struct = Self::default();
30212        __struct.safe_return = buf.get_i32_le()?;
30213        __struct.land = buf.get_i32_le()?;
30214        __struct.mission_next_item = buf.get_i32_le()?;
30215        __struct.mission_end = buf.get_i32_le()?;
30216        __struct.commanded_action = buf.get_i32_le()?;
30217        Ok(__struct)
30218    }
30219    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30220        let mut __tmp = BytesMut::new(bytes);
30221        #[allow(clippy::absurd_extreme_comparisons)]
30222        #[allow(unused_comparisons)]
30223        if __tmp.remaining() < Self::ENCODED_LEN {
30224            panic!(
30225                "buffer is too small (need {} bytes, but got {})",
30226                Self::ENCODED_LEN,
30227                __tmp.remaining(),
30228            )
30229        }
30230        __tmp.put_i32_le(self.safe_return);
30231        __tmp.put_i32_le(self.land);
30232        __tmp.put_i32_le(self.mission_next_item);
30233        __tmp.put_i32_le(self.mission_end);
30234        __tmp.put_i32_le(self.commanded_action);
30235        if matches!(version, MavlinkVersion::V2) {
30236            let len = __tmp.len();
30237            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30238        } else {
30239            __tmp.len()
30240        }
30241    }
30242}
30243#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
30244#[doc = ""]
30245#[doc = "ID: 333"]
30246#[derive(Debug, Clone, PartialEq)]
30247#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30248#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30249#[cfg_attr(feature = "ts", derive(TS))]
30250#[cfg_attr(feature = "ts", ts(export))]
30251pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30252    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30253    pub time_usec: u64,
30254    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
30255    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30256    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30257    pub pos_x: [f32; 5],
30258    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
30259    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30260    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30261    pub pos_y: [f32; 5],
30262    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
30263    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30264    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30265    pub pos_z: [f32; 5],
30266    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
30267    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30268    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30269    pub delta: [f32; 5],
30270    #[doc = "Yaw. Set to NaN for unchanged"]
30271    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30272    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30273    pub pos_yaw: [f32; 5],
30274    #[doc = "Number of valid control points (up-to 5 points are possible)"]
30275    pub valid_points: u8,
30276}
30277impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30278    pub const ENCODED_LEN: usize = 109usize;
30279    pub const DEFAULT: Self = Self {
30280        time_usec: 0_u64,
30281        pos_x: [0.0_f32; 5usize],
30282        pos_y: [0.0_f32; 5usize],
30283        pos_z: [0.0_f32; 5usize],
30284        delta: [0.0_f32; 5usize],
30285        pos_yaw: [0.0_f32; 5usize],
30286        valid_points: 0_u8,
30287    };
30288    #[cfg(feature = "arbitrary")]
30289    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30290        use arbitrary::{Arbitrary, Unstructured};
30291        let mut buf = [0u8; 1024];
30292        rng.fill_bytes(&mut buf);
30293        let mut unstructured = Unstructured::new(&buf);
30294        Self::arbitrary(&mut unstructured).unwrap_or_default()
30295    }
30296}
30297impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30298    fn default() -> Self {
30299        Self::DEFAULT.clone()
30300    }
30301}
30302impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30303    type Message = MavMessage;
30304    const ID: u32 = 333u32;
30305    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
30306    const EXTRA_CRC: u8 = 231u8;
30307    const ENCODED_LEN: usize = 109usize;
30308    fn deser(
30309        _version: MavlinkVersion,
30310        __input: &[u8],
30311    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30312        let avail_len = __input.len();
30313        let mut payload_buf = [0; Self::ENCODED_LEN];
30314        let mut buf = if avail_len < Self::ENCODED_LEN {
30315            payload_buf[0..avail_len].copy_from_slice(__input);
30316            Bytes::new(&payload_buf)
30317        } else {
30318            Bytes::new(__input)
30319        };
30320        let mut __struct = Self::default();
30321        __struct.time_usec = buf.get_u64_le()?;
30322        for v in &mut __struct.pos_x {
30323            let val = buf.get_f32_le()?;
30324            *v = val;
30325        }
30326        for v in &mut __struct.pos_y {
30327            let val = buf.get_f32_le()?;
30328            *v = val;
30329        }
30330        for v in &mut __struct.pos_z {
30331            let val = buf.get_f32_le()?;
30332            *v = val;
30333        }
30334        for v in &mut __struct.delta {
30335            let val = buf.get_f32_le()?;
30336            *v = val;
30337        }
30338        for v in &mut __struct.pos_yaw {
30339            let val = buf.get_f32_le()?;
30340            *v = val;
30341        }
30342        __struct.valid_points = buf.get_u8()?;
30343        Ok(__struct)
30344    }
30345    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30346        let mut __tmp = BytesMut::new(bytes);
30347        #[allow(clippy::absurd_extreme_comparisons)]
30348        #[allow(unused_comparisons)]
30349        if __tmp.remaining() < Self::ENCODED_LEN {
30350            panic!(
30351                "buffer is too small (need {} bytes, but got {})",
30352                Self::ENCODED_LEN,
30353                __tmp.remaining(),
30354            )
30355        }
30356        __tmp.put_u64_le(self.time_usec);
30357        for val in &self.pos_x {
30358            __tmp.put_f32_le(*val);
30359        }
30360        for val in &self.pos_y {
30361            __tmp.put_f32_le(*val);
30362        }
30363        for val in &self.pos_z {
30364            __tmp.put_f32_le(*val);
30365        }
30366        for val in &self.delta {
30367            __tmp.put_f32_le(*val);
30368        }
30369        for val in &self.pos_yaw {
30370            __tmp.put_f32_le(*val);
30371        }
30372        __tmp.put_u8(self.valid_points);
30373        if matches!(version, MavlinkVersion::V2) {
30374            let len = __tmp.len();
30375            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30376        } else {
30377            __tmp.len()
30378        }
30379    }
30380}
30381#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
30382#[doc = ""]
30383#[doc = "ID: 332"]
30384#[derive(Debug, Clone, PartialEq)]
30385#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30386#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30387#[cfg_attr(feature = "ts", derive(TS))]
30388#[cfg_attr(feature = "ts", ts(export))]
30389pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30390    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30391    pub time_usec: u64,
30392    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
30393    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30394    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30395    pub pos_x: [f32; 5],
30396    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
30397    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30398    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30399    pub pos_y: [f32; 5],
30400    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
30401    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30402    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30403    pub pos_z: [f32; 5],
30404    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
30405    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30406    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30407    pub vel_x: [f32; 5],
30408    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
30409    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30410    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30411    pub vel_y: [f32; 5],
30412    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
30413    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30414    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30415    pub vel_z: [f32; 5],
30416    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
30417    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30418    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30419    pub acc_x: [f32; 5],
30420    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
30421    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30422    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30423    pub acc_y: [f32; 5],
30424    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
30425    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30426    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30427    pub acc_z: [f32; 5],
30428    #[doc = "Yaw angle, set to NaN if not being used"]
30429    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30430    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30431    pub pos_yaw: [f32; 5],
30432    #[doc = "Yaw rate, set to NaN if not being used"]
30433    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30434    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30435    pub vel_yaw: [f32; 5],
30436    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
30437    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30438    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30439    pub command: [u16; 5],
30440    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
30441    pub valid_points: u8,
30442}
30443impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30444    pub const ENCODED_LEN: usize = 239usize;
30445    pub const DEFAULT: Self = Self {
30446        time_usec: 0_u64,
30447        pos_x: [0.0_f32; 5usize],
30448        pos_y: [0.0_f32; 5usize],
30449        pos_z: [0.0_f32; 5usize],
30450        vel_x: [0.0_f32; 5usize],
30451        vel_y: [0.0_f32; 5usize],
30452        vel_z: [0.0_f32; 5usize],
30453        acc_x: [0.0_f32; 5usize],
30454        acc_y: [0.0_f32; 5usize],
30455        acc_z: [0.0_f32; 5usize],
30456        pos_yaw: [0.0_f32; 5usize],
30457        vel_yaw: [0.0_f32; 5usize],
30458        command: [0_u16; 5usize],
30459        valid_points: 0_u8,
30460    };
30461    #[cfg(feature = "arbitrary")]
30462    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30463        use arbitrary::{Arbitrary, Unstructured};
30464        let mut buf = [0u8; 1024];
30465        rng.fill_bytes(&mut buf);
30466        let mut unstructured = Unstructured::new(&buf);
30467        Self::arbitrary(&mut unstructured).unwrap_or_default()
30468    }
30469}
30470impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30471    fn default() -> Self {
30472        Self::DEFAULT.clone()
30473    }
30474}
30475impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30476    type Message = MavMessage;
30477    const ID: u32 = 332u32;
30478    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
30479    const EXTRA_CRC: u8 = 236u8;
30480    const ENCODED_LEN: usize = 239usize;
30481    fn deser(
30482        _version: MavlinkVersion,
30483        __input: &[u8],
30484    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30485        let avail_len = __input.len();
30486        let mut payload_buf = [0; Self::ENCODED_LEN];
30487        let mut buf = if avail_len < Self::ENCODED_LEN {
30488            payload_buf[0..avail_len].copy_from_slice(__input);
30489            Bytes::new(&payload_buf)
30490        } else {
30491            Bytes::new(__input)
30492        };
30493        let mut __struct = Self::default();
30494        __struct.time_usec = buf.get_u64_le()?;
30495        for v in &mut __struct.pos_x {
30496            let val = buf.get_f32_le()?;
30497            *v = val;
30498        }
30499        for v in &mut __struct.pos_y {
30500            let val = buf.get_f32_le()?;
30501            *v = val;
30502        }
30503        for v in &mut __struct.pos_z {
30504            let val = buf.get_f32_le()?;
30505            *v = val;
30506        }
30507        for v in &mut __struct.vel_x {
30508            let val = buf.get_f32_le()?;
30509            *v = val;
30510        }
30511        for v in &mut __struct.vel_y {
30512            let val = buf.get_f32_le()?;
30513            *v = val;
30514        }
30515        for v in &mut __struct.vel_z {
30516            let val = buf.get_f32_le()?;
30517            *v = val;
30518        }
30519        for v in &mut __struct.acc_x {
30520            let val = buf.get_f32_le()?;
30521            *v = val;
30522        }
30523        for v in &mut __struct.acc_y {
30524            let val = buf.get_f32_le()?;
30525            *v = val;
30526        }
30527        for v in &mut __struct.acc_z {
30528            let val = buf.get_f32_le()?;
30529            *v = val;
30530        }
30531        for v in &mut __struct.pos_yaw {
30532            let val = buf.get_f32_le()?;
30533            *v = val;
30534        }
30535        for v in &mut __struct.vel_yaw {
30536            let val = buf.get_f32_le()?;
30537            *v = val;
30538        }
30539        for v in &mut __struct.command {
30540            let val = buf.get_u16_le()?;
30541            *v = val;
30542        }
30543        __struct.valid_points = buf.get_u8()?;
30544        Ok(__struct)
30545    }
30546    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30547        let mut __tmp = BytesMut::new(bytes);
30548        #[allow(clippy::absurd_extreme_comparisons)]
30549        #[allow(unused_comparisons)]
30550        if __tmp.remaining() < Self::ENCODED_LEN {
30551            panic!(
30552                "buffer is too small (need {} bytes, but got {})",
30553                Self::ENCODED_LEN,
30554                __tmp.remaining(),
30555            )
30556        }
30557        __tmp.put_u64_le(self.time_usec);
30558        for val in &self.pos_x {
30559            __tmp.put_f32_le(*val);
30560        }
30561        for val in &self.pos_y {
30562            __tmp.put_f32_le(*val);
30563        }
30564        for val in &self.pos_z {
30565            __tmp.put_f32_le(*val);
30566        }
30567        for val in &self.vel_x {
30568            __tmp.put_f32_le(*val);
30569        }
30570        for val in &self.vel_y {
30571            __tmp.put_f32_le(*val);
30572        }
30573        for val in &self.vel_z {
30574            __tmp.put_f32_le(*val);
30575        }
30576        for val in &self.acc_x {
30577            __tmp.put_f32_le(*val);
30578        }
30579        for val in &self.acc_y {
30580            __tmp.put_f32_le(*val);
30581        }
30582        for val in &self.acc_z {
30583            __tmp.put_f32_le(*val);
30584        }
30585        for val in &self.pos_yaw {
30586            __tmp.put_f32_le(*val);
30587        }
30588        for val in &self.vel_yaw {
30589            __tmp.put_f32_le(*val);
30590        }
30591        for val in &self.command {
30592            __tmp.put_u16_le(*val);
30593        }
30594        __tmp.put_u8(self.valid_points);
30595        if matches!(version, MavlinkVersion::V2) {
30596            let len = __tmp.len();
30597            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30598        } else {
30599            __tmp.len()
30600        }
30601    }
30602}
30603#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
30604#[doc = ""]
30605#[doc = "ID: 385"]
30606#[derive(Debug, Clone, PartialEq)]
30607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30609#[cfg_attr(feature = "ts", derive(TS))]
30610#[cfg_attr(feature = "ts", ts(export))]
30611pub struct TUNNEL_DATA {
30612    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30613    pub payload_type: MavTunnelPayloadType,
30614    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
30615    pub target_system: u8,
30616    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
30617    pub target_component: u8,
30618    #[doc = "Length of the data transported in payload"]
30619    pub payload_length: u8,
30620    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
30621    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30622    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30623    pub payload: [u8; 128],
30624}
30625impl TUNNEL_DATA {
30626    pub const ENCODED_LEN: usize = 133usize;
30627    pub const DEFAULT: Self = Self {
30628        payload_type: MavTunnelPayloadType::DEFAULT,
30629        target_system: 0_u8,
30630        target_component: 0_u8,
30631        payload_length: 0_u8,
30632        payload: [0_u8; 128usize],
30633    };
30634    #[cfg(feature = "arbitrary")]
30635    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30636        use arbitrary::{Arbitrary, Unstructured};
30637        let mut buf = [0u8; 1024];
30638        rng.fill_bytes(&mut buf);
30639        let mut unstructured = Unstructured::new(&buf);
30640        Self::arbitrary(&mut unstructured).unwrap_or_default()
30641    }
30642}
30643impl Default for TUNNEL_DATA {
30644    fn default() -> Self {
30645        Self::DEFAULT.clone()
30646    }
30647}
30648impl MessageData for TUNNEL_DATA {
30649    type Message = MavMessage;
30650    const ID: u32 = 385u32;
30651    const NAME: &'static str = "TUNNEL";
30652    const EXTRA_CRC: u8 = 147u8;
30653    const ENCODED_LEN: usize = 133usize;
30654    fn deser(
30655        _version: MavlinkVersion,
30656        __input: &[u8],
30657    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30658        let avail_len = __input.len();
30659        let mut payload_buf = [0; Self::ENCODED_LEN];
30660        let mut buf = if avail_len < Self::ENCODED_LEN {
30661            payload_buf[0..avail_len].copy_from_slice(__input);
30662            Bytes::new(&payload_buf)
30663        } else {
30664            Bytes::new(__input)
30665        };
30666        let mut __struct = Self::default();
30667        let tmp = buf.get_u16_le()?;
30668        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
30669            ::mavlink_core::error::ParserError::InvalidEnum {
30670                enum_type: "MavTunnelPayloadType",
30671                value: tmp as u64,
30672            },
30673        )?;
30674        __struct.target_system = buf.get_u8()?;
30675        __struct.target_component = buf.get_u8()?;
30676        __struct.payload_length = buf.get_u8()?;
30677        for v in &mut __struct.payload {
30678            let val = buf.get_u8()?;
30679            *v = val;
30680        }
30681        Ok(__struct)
30682    }
30683    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30684        let mut __tmp = BytesMut::new(bytes);
30685        #[allow(clippy::absurd_extreme_comparisons)]
30686        #[allow(unused_comparisons)]
30687        if __tmp.remaining() < Self::ENCODED_LEN {
30688            panic!(
30689                "buffer is too small (need {} bytes, but got {})",
30690                Self::ENCODED_LEN,
30691                __tmp.remaining(),
30692            )
30693        }
30694        __tmp.put_u16_le(self.payload_type as u16);
30695        __tmp.put_u8(self.target_system);
30696        __tmp.put_u8(self.target_component);
30697        __tmp.put_u8(self.payload_length);
30698        for val in &self.payload {
30699            __tmp.put_u8(*val);
30700        }
30701        if matches!(version, MavlinkVersion::V2) {
30702            let len = __tmp.len();
30703            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30704        } else {
30705            __tmp.len()
30706        }
30707    }
30708}
30709#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
30710#[doc = ""]
30711#[doc = "ID: 311"]
30712#[derive(Debug, Clone, PartialEq)]
30713#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30715#[cfg_attr(feature = "ts", derive(TS))]
30716#[cfg_attr(feature = "ts", ts(export))]
30717pub struct UAVCAN_NODE_INFO_DATA {
30718    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30719    pub time_usec: u64,
30720    #[doc = "Time since the start-up of the node."]
30721    pub uptime_sec: u32,
30722    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
30723    pub sw_vcs_commit: u32,
30724    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
30725    #[cfg_attr(feature = "ts", ts(type = "string"))]
30726    pub name: CharArray<80>,
30727    #[doc = "Hardware major version number."]
30728    pub hw_version_major: u8,
30729    #[doc = "Hardware minor version number."]
30730    pub hw_version_minor: u8,
30731    #[doc = "Hardware unique 128-bit ID."]
30732    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30733    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30734    pub hw_unique_id: [u8; 16],
30735    #[doc = "Software major version number."]
30736    pub sw_version_major: u8,
30737    #[doc = "Software minor version number."]
30738    pub sw_version_minor: u8,
30739}
30740impl UAVCAN_NODE_INFO_DATA {
30741    pub const ENCODED_LEN: usize = 116usize;
30742    pub const DEFAULT: Self = Self {
30743        time_usec: 0_u64,
30744        uptime_sec: 0_u32,
30745        sw_vcs_commit: 0_u32,
30746        name: CharArray::new([0_u8; 80usize]),
30747        hw_version_major: 0_u8,
30748        hw_version_minor: 0_u8,
30749        hw_unique_id: [0_u8; 16usize],
30750        sw_version_major: 0_u8,
30751        sw_version_minor: 0_u8,
30752    };
30753    #[cfg(feature = "arbitrary")]
30754    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30755        use arbitrary::{Arbitrary, Unstructured};
30756        let mut buf = [0u8; 1024];
30757        rng.fill_bytes(&mut buf);
30758        let mut unstructured = Unstructured::new(&buf);
30759        Self::arbitrary(&mut unstructured).unwrap_or_default()
30760    }
30761}
30762impl Default for UAVCAN_NODE_INFO_DATA {
30763    fn default() -> Self {
30764        Self::DEFAULT.clone()
30765    }
30766}
30767impl MessageData for UAVCAN_NODE_INFO_DATA {
30768    type Message = MavMessage;
30769    const ID: u32 = 311u32;
30770    const NAME: &'static str = "UAVCAN_NODE_INFO";
30771    const EXTRA_CRC: u8 = 95u8;
30772    const ENCODED_LEN: usize = 116usize;
30773    fn deser(
30774        _version: MavlinkVersion,
30775        __input: &[u8],
30776    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30777        let avail_len = __input.len();
30778        let mut payload_buf = [0; Self::ENCODED_LEN];
30779        let mut buf = if avail_len < Self::ENCODED_LEN {
30780            payload_buf[0..avail_len].copy_from_slice(__input);
30781            Bytes::new(&payload_buf)
30782        } else {
30783            Bytes::new(__input)
30784        };
30785        let mut __struct = Self::default();
30786        __struct.time_usec = buf.get_u64_le()?;
30787        __struct.uptime_sec = buf.get_u32_le()?;
30788        __struct.sw_vcs_commit = buf.get_u32_le()?;
30789        let mut tmp = [0_u8; 80usize];
30790        for v in &mut tmp {
30791            *v = buf.get_u8()?;
30792        }
30793        __struct.name = CharArray::new(tmp);
30794        __struct.hw_version_major = buf.get_u8()?;
30795        __struct.hw_version_minor = buf.get_u8()?;
30796        for v in &mut __struct.hw_unique_id {
30797            let val = buf.get_u8()?;
30798            *v = val;
30799        }
30800        __struct.sw_version_major = buf.get_u8()?;
30801        __struct.sw_version_minor = buf.get_u8()?;
30802        Ok(__struct)
30803    }
30804    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30805        let mut __tmp = BytesMut::new(bytes);
30806        #[allow(clippy::absurd_extreme_comparisons)]
30807        #[allow(unused_comparisons)]
30808        if __tmp.remaining() < Self::ENCODED_LEN {
30809            panic!(
30810                "buffer is too small (need {} bytes, but got {})",
30811                Self::ENCODED_LEN,
30812                __tmp.remaining(),
30813            )
30814        }
30815        __tmp.put_u64_le(self.time_usec);
30816        __tmp.put_u32_le(self.uptime_sec);
30817        __tmp.put_u32_le(self.sw_vcs_commit);
30818        for val in &self.name {
30819            __tmp.put_u8(*val);
30820        }
30821        __tmp.put_u8(self.hw_version_major);
30822        __tmp.put_u8(self.hw_version_minor);
30823        for val in &self.hw_unique_id {
30824            __tmp.put_u8(*val);
30825        }
30826        __tmp.put_u8(self.sw_version_major);
30827        __tmp.put_u8(self.sw_version_minor);
30828        if matches!(version, MavlinkVersion::V2) {
30829            let len = __tmp.len();
30830            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30831        } else {
30832            __tmp.len()
30833        }
30834    }
30835}
30836#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
30837#[doc = ""]
30838#[doc = "ID: 310"]
30839#[derive(Debug, Clone, PartialEq)]
30840#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30841#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30842#[cfg_attr(feature = "ts", derive(TS))]
30843#[cfg_attr(feature = "ts", ts(export))]
30844pub struct UAVCAN_NODE_STATUS_DATA {
30845    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30846    pub time_usec: u64,
30847    #[doc = "Time since the start-up of the node."]
30848    pub uptime_sec: u32,
30849    #[doc = "Vendor-specific status information."]
30850    pub vendor_specific_status_code: u16,
30851    #[doc = "Generalized node health status."]
30852    pub health: UavcanNodeHealth,
30853    #[doc = "Generalized operating mode."]
30854    pub mode: UavcanNodeMode,
30855    #[doc = "Not used currently."]
30856    pub sub_mode: u8,
30857}
30858impl UAVCAN_NODE_STATUS_DATA {
30859    pub const ENCODED_LEN: usize = 17usize;
30860    pub const DEFAULT: Self = Self {
30861        time_usec: 0_u64,
30862        uptime_sec: 0_u32,
30863        vendor_specific_status_code: 0_u16,
30864        health: UavcanNodeHealth::DEFAULT,
30865        mode: UavcanNodeMode::DEFAULT,
30866        sub_mode: 0_u8,
30867    };
30868    #[cfg(feature = "arbitrary")]
30869    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30870        use arbitrary::{Arbitrary, Unstructured};
30871        let mut buf = [0u8; 1024];
30872        rng.fill_bytes(&mut buf);
30873        let mut unstructured = Unstructured::new(&buf);
30874        Self::arbitrary(&mut unstructured).unwrap_or_default()
30875    }
30876}
30877impl Default for UAVCAN_NODE_STATUS_DATA {
30878    fn default() -> Self {
30879        Self::DEFAULT.clone()
30880    }
30881}
30882impl MessageData for UAVCAN_NODE_STATUS_DATA {
30883    type Message = MavMessage;
30884    const ID: u32 = 310u32;
30885    const NAME: &'static str = "UAVCAN_NODE_STATUS";
30886    const EXTRA_CRC: u8 = 28u8;
30887    const ENCODED_LEN: usize = 17usize;
30888    fn deser(
30889        _version: MavlinkVersion,
30890        __input: &[u8],
30891    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30892        let avail_len = __input.len();
30893        let mut payload_buf = [0; Self::ENCODED_LEN];
30894        let mut buf = if avail_len < Self::ENCODED_LEN {
30895            payload_buf[0..avail_len].copy_from_slice(__input);
30896            Bytes::new(&payload_buf)
30897        } else {
30898            Bytes::new(__input)
30899        };
30900        let mut __struct = Self::default();
30901        __struct.time_usec = buf.get_u64_le()?;
30902        __struct.uptime_sec = buf.get_u32_le()?;
30903        __struct.vendor_specific_status_code = buf.get_u16_le()?;
30904        let tmp = buf.get_u8()?;
30905        __struct.health =
30906            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30907                enum_type: "UavcanNodeHealth",
30908                value: tmp as u64,
30909            })?;
30910        let tmp = buf.get_u8()?;
30911        __struct.mode =
30912            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30913                enum_type: "UavcanNodeMode",
30914                value: tmp as u64,
30915            })?;
30916        __struct.sub_mode = buf.get_u8()?;
30917        Ok(__struct)
30918    }
30919    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30920        let mut __tmp = BytesMut::new(bytes);
30921        #[allow(clippy::absurd_extreme_comparisons)]
30922        #[allow(unused_comparisons)]
30923        if __tmp.remaining() < Self::ENCODED_LEN {
30924            panic!(
30925                "buffer is too small (need {} bytes, but got {})",
30926                Self::ENCODED_LEN,
30927                __tmp.remaining(),
30928            )
30929        }
30930        __tmp.put_u64_le(self.time_usec);
30931        __tmp.put_u32_le(self.uptime_sec);
30932        __tmp.put_u16_le(self.vendor_specific_status_code);
30933        __tmp.put_u8(self.health as u8);
30934        __tmp.put_u8(self.mode as u8);
30935        __tmp.put_u8(self.sub_mode);
30936        if matches!(version, MavlinkVersion::V2) {
30937            let len = __tmp.len();
30938            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30939        } else {
30940            __tmp.len()
30941        }
30942    }
30943}
30944#[doc = "The global position resulting from GPS and sensor fusion."]
30945#[doc = ""]
30946#[doc = "ID: 340"]
30947#[derive(Debug, Clone, PartialEq)]
30948#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30949#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30950#[cfg_attr(feature = "ts", derive(TS))]
30951#[cfg_attr(feature = "ts", ts(export))]
30952pub struct UTM_GLOBAL_POSITION_DATA {
30953    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
30954    pub time: u64,
30955    #[doc = "Latitude (WGS84)"]
30956    pub lat: i32,
30957    #[doc = "Longitude (WGS84)"]
30958    pub lon: i32,
30959    #[doc = "Altitude (WGS84)"]
30960    pub alt: i32,
30961    #[doc = "Altitude above ground"]
30962    pub relative_alt: i32,
30963    #[doc = "Next waypoint, latitude (WGS84)"]
30964    pub next_lat: i32,
30965    #[doc = "Next waypoint, longitude (WGS84)"]
30966    pub next_lon: i32,
30967    #[doc = "Next waypoint, altitude (WGS84)"]
30968    pub next_alt: i32,
30969    #[doc = "Ground X speed (latitude, positive north)"]
30970    pub vx: i16,
30971    #[doc = "Ground Y speed (longitude, positive east)"]
30972    pub vy: i16,
30973    #[doc = "Ground Z speed (altitude, positive down)"]
30974    pub vz: i16,
30975    #[doc = "Horizontal position uncertainty (standard deviation)"]
30976    pub h_acc: u16,
30977    #[doc = "Altitude uncertainty (standard deviation)"]
30978    pub v_acc: u16,
30979    #[doc = "Speed uncertainty (standard deviation)"]
30980    pub vel_acc: u16,
30981    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
30982    pub update_rate: u16,
30983    #[doc = "Unique UAS ID."]
30984    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30985    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30986    pub uas_id: [u8; 18],
30987    #[doc = "Flight state"]
30988    pub flight_state: UtmFlightState,
30989    #[doc = "Bitwise OR combination of the data available flags."]
30990    pub flags: UtmDataAvailFlags,
30991}
30992impl UTM_GLOBAL_POSITION_DATA {
30993    pub const ENCODED_LEN: usize = 70usize;
30994    pub const DEFAULT: Self = Self {
30995        time: 0_u64,
30996        lat: 0_i32,
30997        lon: 0_i32,
30998        alt: 0_i32,
30999        relative_alt: 0_i32,
31000        next_lat: 0_i32,
31001        next_lon: 0_i32,
31002        next_alt: 0_i32,
31003        vx: 0_i16,
31004        vy: 0_i16,
31005        vz: 0_i16,
31006        h_acc: 0_u16,
31007        v_acc: 0_u16,
31008        vel_acc: 0_u16,
31009        update_rate: 0_u16,
31010        uas_id: [0_u8; 18usize],
31011        flight_state: UtmFlightState::DEFAULT,
31012        flags: UtmDataAvailFlags::DEFAULT,
31013    };
31014    #[cfg(feature = "arbitrary")]
31015    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31016        use arbitrary::{Arbitrary, Unstructured};
31017        let mut buf = [0u8; 1024];
31018        rng.fill_bytes(&mut buf);
31019        let mut unstructured = Unstructured::new(&buf);
31020        Self::arbitrary(&mut unstructured).unwrap_or_default()
31021    }
31022}
31023impl Default for UTM_GLOBAL_POSITION_DATA {
31024    fn default() -> Self {
31025        Self::DEFAULT.clone()
31026    }
31027}
31028impl MessageData for UTM_GLOBAL_POSITION_DATA {
31029    type Message = MavMessage;
31030    const ID: u32 = 340u32;
31031    const NAME: &'static str = "UTM_GLOBAL_POSITION";
31032    const EXTRA_CRC: u8 = 99u8;
31033    const ENCODED_LEN: usize = 70usize;
31034    fn deser(
31035        _version: MavlinkVersion,
31036        __input: &[u8],
31037    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31038        let avail_len = __input.len();
31039        let mut payload_buf = [0; Self::ENCODED_LEN];
31040        let mut buf = if avail_len < Self::ENCODED_LEN {
31041            payload_buf[0..avail_len].copy_from_slice(__input);
31042            Bytes::new(&payload_buf)
31043        } else {
31044            Bytes::new(__input)
31045        };
31046        let mut __struct = Self::default();
31047        __struct.time = buf.get_u64_le()?;
31048        __struct.lat = buf.get_i32_le()?;
31049        __struct.lon = buf.get_i32_le()?;
31050        __struct.alt = buf.get_i32_le()?;
31051        __struct.relative_alt = buf.get_i32_le()?;
31052        __struct.next_lat = buf.get_i32_le()?;
31053        __struct.next_lon = buf.get_i32_le()?;
31054        __struct.next_alt = buf.get_i32_le()?;
31055        __struct.vx = buf.get_i16_le()?;
31056        __struct.vy = buf.get_i16_le()?;
31057        __struct.vz = buf.get_i16_le()?;
31058        __struct.h_acc = buf.get_u16_le()?;
31059        __struct.v_acc = buf.get_u16_le()?;
31060        __struct.vel_acc = buf.get_u16_le()?;
31061        __struct.update_rate = buf.get_u16_le()?;
31062        for v in &mut __struct.uas_id {
31063            let val = buf.get_u8()?;
31064            *v = val;
31065        }
31066        let tmp = buf.get_u8()?;
31067        __struct.flight_state =
31068            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31069                enum_type: "UtmFlightState",
31070                value: tmp as u64,
31071            })?;
31072        let tmp = buf.get_u8()?;
31073        __struct.flags = UtmDataAvailFlags::from_bits(tmp as <UtmDataAvailFlags as Flags>::Bits)
31074            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31075                flag_type: "UtmDataAvailFlags",
31076                value: tmp as u64,
31077            })?;
31078        Ok(__struct)
31079    }
31080    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31081        let mut __tmp = BytesMut::new(bytes);
31082        #[allow(clippy::absurd_extreme_comparisons)]
31083        #[allow(unused_comparisons)]
31084        if __tmp.remaining() < Self::ENCODED_LEN {
31085            panic!(
31086                "buffer is too small (need {} bytes, but got {})",
31087                Self::ENCODED_LEN,
31088                __tmp.remaining(),
31089            )
31090        }
31091        __tmp.put_u64_le(self.time);
31092        __tmp.put_i32_le(self.lat);
31093        __tmp.put_i32_le(self.lon);
31094        __tmp.put_i32_le(self.alt);
31095        __tmp.put_i32_le(self.relative_alt);
31096        __tmp.put_i32_le(self.next_lat);
31097        __tmp.put_i32_le(self.next_lon);
31098        __tmp.put_i32_le(self.next_alt);
31099        __tmp.put_i16_le(self.vx);
31100        __tmp.put_i16_le(self.vy);
31101        __tmp.put_i16_le(self.vz);
31102        __tmp.put_u16_le(self.h_acc);
31103        __tmp.put_u16_le(self.v_acc);
31104        __tmp.put_u16_le(self.vel_acc);
31105        __tmp.put_u16_le(self.update_rate);
31106        for val in &self.uas_id {
31107            __tmp.put_u8(*val);
31108        }
31109        __tmp.put_u8(self.flight_state as u8);
31110        __tmp.put_u8(self.flags.bits() as u8);
31111        if matches!(version, MavlinkVersion::V2) {
31112            let len = __tmp.len();
31113            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31114        } else {
31115            __tmp.len()
31116        }
31117    }
31118}
31119#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
31120#[doc = ""]
31121#[doc = "ID: 248"]
31122#[derive(Debug, Clone, PartialEq)]
31123#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31124#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31125#[cfg_attr(feature = "ts", derive(TS))]
31126#[cfg_attr(feature = "ts", ts(export))]
31127pub struct V2_EXTENSION_DATA {
31128    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
31129    pub message_type: u16,
31130    #[doc = "Network ID (0 for broadcast)"]
31131    pub target_network: u8,
31132    #[doc = "System ID (0 for broadcast)"]
31133    pub target_system: u8,
31134    #[doc = "Component ID (0 for broadcast)"]
31135    pub target_component: u8,
31136    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
31137    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31138    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31139    pub payload: [u8; 249],
31140}
31141impl V2_EXTENSION_DATA {
31142    pub const ENCODED_LEN: usize = 254usize;
31143    pub const DEFAULT: Self = Self {
31144        message_type: 0_u16,
31145        target_network: 0_u8,
31146        target_system: 0_u8,
31147        target_component: 0_u8,
31148        payload: [0_u8; 249usize],
31149    };
31150    #[cfg(feature = "arbitrary")]
31151    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31152        use arbitrary::{Arbitrary, Unstructured};
31153        let mut buf = [0u8; 1024];
31154        rng.fill_bytes(&mut buf);
31155        let mut unstructured = Unstructured::new(&buf);
31156        Self::arbitrary(&mut unstructured).unwrap_or_default()
31157    }
31158}
31159impl Default for V2_EXTENSION_DATA {
31160    fn default() -> Self {
31161        Self::DEFAULT.clone()
31162    }
31163}
31164impl MessageData for V2_EXTENSION_DATA {
31165    type Message = MavMessage;
31166    const ID: u32 = 248u32;
31167    const NAME: &'static str = "V2_EXTENSION";
31168    const EXTRA_CRC: u8 = 8u8;
31169    const ENCODED_LEN: usize = 254usize;
31170    fn deser(
31171        _version: MavlinkVersion,
31172        __input: &[u8],
31173    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31174        let avail_len = __input.len();
31175        let mut payload_buf = [0; Self::ENCODED_LEN];
31176        let mut buf = if avail_len < Self::ENCODED_LEN {
31177            payload_buf[0..avail_len].copy_from_slice(__input);
31178            Bytes::new(&payload_buf)
31179        } else {
31180            Bytes::new(__input)
31181        };
31182        let mut __struct = Self::default();
31183        __struct.message_type = buf.get_u16_le()?;
31184        __struct.target_network = buf.get_u8()?;
31185        __struct.target_system = buf.get_u8()?;
31186        __struct.target_component = buf.get_u8()?;
31187        for v in &mut __struct.payload {
31188            let val = buf.get_u8()?;
31189            *v = val;
31190        }
31191        Ok(__struct)
31192    }
31193    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31194        let mut __tmp = BytesMut::new(bytes);
31195        #[allow(clippy::absurd_extreme_comparisons)]
31196        #[allow(unused_comparisons)]
31197        if __tmp.remaining() < Self::ENCODED_LEN {
31198            panic!(
31199                "buffer is too small (need {} bytes, but got {})",
31200                Self::ENCODED_LEN,
31201                __tmp.remaining(),
31202            )
31203        }
31204        __tmp.put_u16_le(self.message_type);
31205        __tmp.put_u8(self.target_network);
31206        __tmp.put_u8(self.target_system);
31207        __tmp.put_u8(self.target_component);
31208        for val in &self.payload {
31209            __tmp.put_u8(*val);
31210        }
31211        if matches!(version, MavlinkVersion::V2) {
31212            let len = __tmp.len();
31213            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31214        } else {
31215            __tmp.len()
31216        }
31217    }
31218}
31219#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
31220#[doc = ""]
31221#[doc = "ID: 74"]
31222#[derive(Debug, Clone, PartialEq)]
31223#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31224#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31225#[cfg_attr(feature = "ts", derive(TS))]
31226#[cfg_attr(feature = "ts", ts(export))]
31227pub struct VFR_HUD_DATA {
31228    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
31229    pub airspeed: f32,
31230    #[doc = "Current ground speed."]
31231    pub groundspeed: f32,
31232    #[doc = "Current altitude (MSL)."]
31233    pub alt: f32,
31234    #[doc = "Current climb rate."]
31235    pub climb: f32,
31236    #[doc = "Current heading in compass units (0-360, 0=north)."]
31237    pub heading: i16,
31238    #[doc = "Current throttle setting (0 to 100)."]
31239    pub throttle: u16,
31240}
31241impl VFR_HUD_DATA {
31242    pub const ENCODED_LEN: usize = 20usize;
31243    pub const DEFAULT: Self = Self {
31244        airspeed: 0.0_f32,
31245        groundspeed: 0.0_f32,
31246        alt: 0.0_f32,
31247        climb: 0.0_f32,
31248        heading: 0_i16,
31249        throttle: 0_u16,
31250    };
31251    #[cfg(feature = "arbitrary")]
31252    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31253        use arbitrary::{Arbitrary, Unstructured};
31254        let mut buf = [0u8; 1024];
31255        rng.fill_bytes(&mut buf);
31256        let mut unstructured = Unstructured::new(&buf);
31257        Self::arbitrary(&mut unstructured).unwrap_or_default()
31258    }
31259}
31260impl Default for VFR_HUD_DATA {
31261    fn default() -> Self {
31262        Self::DEFAULT.clone()
31263    }
31264}
31265impl MessageData for VFR_HUD_DATA {
31266    type Message = MavMessage;
31267    const ID: u32 = 74u32;
31268    const NAME: &'static str = "VFR_HUD";
31269    const EXTRA_CRC: u8 = 20u8;
31270    const ENCODED_LEN: usize = 20usize;
31271    fn deser(
31272        _version: MavlinkVersion,
31273        __input: &[u8],
31274    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31275        let avail_len = __input.len();
31276        let mut payload_buf = [0; Self::ENCODED_LEN];
31277        let mut buf = if avail_len < Self::ENCODED_LEN {
31278            payload_buf[0..avail_len].copy_from_slice(__input);
31279            Bytes::new(&payload_buf)
31280        } else {
31281            Bytes::new(__input)
31282        };
31283        let mut __struct = Self::default();
31284        __struct.airspeed = buf.get_f32_le()?;
31285        __struct.groundspeed = buf.get_f32_le()?;
31286        __struct.alt = buf.get_f32_le()?;
31287        __struct.climb = buf.get_f32_le()?;
31288        __struct.heading = buf.get_i16_le()?;
31289        __struct.throttle = buf.get_u16_le()?;
31290        Ok(__struct)
31291    }
31292    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31293        let mut __tmp = BytesMut::new(bytes);
31294        #[allow(clippy::absurd_extreme_comparisons)]
31295        #[allow(unused_comparisons)]
31296        if __tmp.remaining() < Self::ENCODED_LEN {
31297            panic!(
31298                "buffer is too small (need {} bytes, but got {})",
31299                Self::ENCODED_LEN,
31300                __tmp.remaining(),
31301            )
31302        }
31303        __tmp.put_f32_le(self.airspeed);
31304        __tmp.put_f32_le(self.groundspeed);
31305        __tmp.put_f32_le(self.alt);
31306        __tmp.put_f32_le(self.climb);
31307        __tmp.put_i16_le(self.heading);
31308        __tmp.put_u16_le(self.throttle);
31309        if matches!(version, MavlinkVersion::V2) {
31310            let len = __tmp.len();
31311            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31312        } else {
31313            __tmp.len()
31314        }
31315    }
31316}
31317#[doc = "Vibration levels and accelerometer clipping."]
31318#[doc = ""]
31319#[doc = "ID: 241"]
31320#[derive(Debug, Clone, PartialEq)]
31321#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31322#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31323#[cfg_attr(feature = "ts", derive(TS))]
31324#[cfg_attr(feature = "ts", ts(export))]
31325pub struct VIBRATION_DATA {
31326    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31327    pub time_usec: u64,
31328    #[doc = "Vibration levels on X-axis"]
31329    pub vibration_x: f32,
31330    #[doc = "Vibration levels on Y-axis"]
31331    pub vibration_y: f32,
31332    #[doc = "Vibration levels on Z-axis"]
31333    pub vibration_z: f32,
31334    #[doc = "first accelerometer clipping count"]
31335    pub clipping_0: u32,
31336    #[doc = "second accelerometer clipping count"]
31337    pub clipping_1: u32,
31338    #[doc = "third accelerometer clipping count"]
31339    pub clipping_2: u32,
31340}
31341impl VIBRATION_DATA {
31342    pub const ENCODED_LEN: usize = 32usize;
31343    pub const DEFAULT: Self = Self {
31344        time_usec: 0_u64,
31345        vibration_x: 0.0_f32,
31346        vibration_y: 0.0_f32,
31347        vibration_z: 0.0_f32,
31348        clipping_0: 0_u32,
31349        clipping_1: 0_u32,
31350        clipping_2: 0_u32,
31351    };
31352    #[cfg(feature = "arbitrary")]
31353    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31354        use arbitrary::{Arbitrary, Unstructured};
31355        let mut buf = [0u8; 1024];
31356        rng.fill_bytes(&mut buf);
31357        let mut unstructured = Unstructured::new(&buf);
31358        Self::arbitrary(&mut unstructured).unwrap_or_default()
31359    }
31360}
31361impl Default for VIBRATION_DATA {
31362    fn default() -> Self {
31363        Self::DEFAULT.clone()
31364    }
31365}
31366impl MessageData for VIBRATION_DATA {
31367    type Message = MavMessage;
31368    const ID: u32 = 241u32;
31369    const NAME: &'static str = "VIBRATION";
31370    const EXTRA_CRC: u8 = 90u8;
31371    const ENCODED_LEN: usize = 32usize;
31372    fn deser(
31373        _version: MavlinkVersion,
31374        __input: &[u8],
31375    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31376        let avail_len = __input.len();
31377        let mut payload_buf = [0; Self::ENCODED_LEN];
31378        let mut buf = if avail_len < Self::ENCODED_LEN {
31379            payload_buf[0..avail_len].copy_from_slice(__input);
31380            Bytes::new(&payload_buf)
31381        } else {
31382            Bytes::new(__input)
31383        };
31384        let mut __struct = Self::default();
31385        __struct.time_usec = buf.get_u64_le()?;
31386        __struct.vibration_x = buf.get_f32_le()?;
31387        __struct.vibration_y = buf.get_f32_le()?;
31388        __struct.vibration_z = buf.get_f32_le()?;
31389        __struct.clipping_0 = buf.get_u32_le()?;
31390        __struct.clipping_1 = buf.get_u32_le()?;
31391        __struct.clipping_2 = buf.get_u32_le()?;
31392        Ok(__struct)
31393    }
31394    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31395        let mut __tmp = BytesMut::new(bytes);
31396        #[allow(clippy::absurd_extreme_comparisons)]
31397        #[allow(unused_comparisons)]
31398        if __tmp.remaining() < Self::ENCODED_LEN {
31399            panic!(
31400                "buffer is too small (need {} bytes, but got {})",
31401                Self::ENCODED_LEN,
31402                __tmp.remaining(),
31403            )
31404        }
31405        __tmp.put_u64_le(self.time_usec);
31406        __tmp.put_f32_le(self.vibration_x);
31407        __tmp.put_f32_le(self.vibration_y);
31408        __tmp.put_f32_le(self.vibration_z);
31409        __tmp.put_u32_le(self.clipping_0);
31410        __tmp.put_u32_le(self.clipping_1);
31411        __tmp.put_u32_le(self.clipping_2);
31412        if matches!(version, MavlinkVersion::V2) {
31413            let len = __tmp.len();
31414            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31415        } else {
31416            __tmp.len()
31417        }
31418    }
31419}
31420#[doc = "Global position estimate from a Vicon motion system source."]
31421#[doc = ""]
31422#[doc = "ID: 104"]
31423#[derive(Debug, Clone, PartialEq)]
31424#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31426#[cfg_attr(feature = "ts", derive(TS))]
31427#[cfg_attr(feature = "ts", ts(export))]
31428pub struct VICON_POSITION_ESTIMATE_DATA {
31429    #[doc = "Timestamp (UNIX time or time since system boot)"]
31430    pub usec: u64,
31431    #[doc = "Global X position"]
31432    pub x: f32,
31433    #[doc = "Global Y position"]
31434    pub y: f32,
31435    #[doc = "Global Z position"]
31436    pub z: f32,
31437    #[doc = "Roll angle"]
31438    pub roll: f32,
31439    #[doc = "Pitch angle"]
31440    pub pitch: f32,
31441    #[doc = "Yaw angle"]
31442    pub yaw: f32,
31443    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31444    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31445    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31446    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31447    pub covariance: [f32; 21],
31448}
31449impl VICON_POSITION_ESTIMATE_DATA {
31450    pub const ENCODED_LEN: usize = 116usize;
31451    pub const DEFAULT: Self = Self {
31452        usec: 0_u64,
31453        x: 0.0_f32,
31454        y: 0.0_f32,
31455        z: 0.0_f32,
31456        roll: 0.0_f32,
31457        pitch: 0.0_f32,
31458        yaw: 0.0_f32,
31459        covariance: [0.0_f32; 21usize],
31460    };
31461    #[cfg(feature = "arbitrary")]
31462    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31463        use arbitrary::{Arbitrary, Unstructured};
31464        let mut buf = [0u8; 1024];
31465        rng.fill_bytes(&mut buf);
31466        let mut unstructured = Unstructured::new(&buf);
31467        Self::arbitrary(&mut unstructured).unwrap_or_default()
31468    }
31469}
31470impl Default for VICON_POSITION_ESTIMATE_DATA {
31471    fn default() -> Self {
31472        Self::DEFAULT.clone()
31473    }
31474}
31475impl MessageData for VICON_POSITION_ESTIMATE_DATA {
31476    type Message = MavMessage;
31477    const ID: u32 = 104u32;
31478    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
31479    const EXTRA_CRC: u8 = 56u8;
31480    const ENCODED_LEN: usize = 116usize;
31481    fn deser(
31482        _version: MavlinkVersion,
31483        __input: &[u8],
31484    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31485        let avail_len = __input.len();
31486        let mut payload_buf = [0; Self::ENCODED_LEN];
31487        let mut buf = if avail_len < Self::ENCODED_LEN {
31488            payload_buf[0..avail_len].copy_from_slice(__input);
31489            Bytes::new(&payload_buf)
31490        } else {
31491            Bytes::new(__input)
31492        };
31493        let mut __struct = Self::default();
31494        __struct.usec = buf.get_u64_le()?;
31495        __struct.x = buf.get_f32_le()?;
31496        __struct.y = buf.get_f32_le()?;
31497        __struct.z = buf.get_f32_le()?;
31498        __struct.roll = buf.get_f32_le()?;
31499        __struct.pitch = buf.get_f32_le()?;
31500        __struct.yaw = buf.get_f32_le()?;
31501        for v in &mut __struct.covariance {
31502            let val = buf.get_f32_le()?;
31503            *v = val;
31504        }
31505        Ok(__struct)
31506    }
31507    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31508        let mut __tmp = BytesMut::new(bytes);
31509        #[allow(clippy::absurd_extreme_comparisons)]
31510        #[allow(unused_comparisons)]
31511        if __tmp.remaining() < Self::ENCODED_LEN {
31512            panic!(
31513                "buffer is too small (need {} bytes, but got {})",
31514                Self::ENCODED_LEN,
31515                __tmp.remaining(),
31516            )
31517        }
31518        __tmp.put_u64_le(self.usec);
31519        __tmp.put_f32_le(self.x);
31520        __tmp.put_f32_le(self.y);
31521        __tmp.put_f32_le(self.z);
31522        __tmp.put_f32_le(self.roll);
31523        __tmp.put_f32_le(self.pitch);
31524        __tmp.put_f32_le(self.yaw);
31525        if matches!(version, MavlinkVersion::V2) {
31526            for val in &self.covariance {
31527                __tmp.put_f32_le(*val);
31528            }
31529            let len = __tmp.len();
31530            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31531        } else {
31532            __tmp.len()
31533        }
31534    }
31535}
31536#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
31537#[doc = ""]
31538#[doc = "ID: 269"]
31539#[derive(Debug, Clone, PartialEq)]
31540#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31541#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31542#[cfg_attr(feature = "ts", derive(TS))]
31543#[cfg_attr(feature = "ts", ts(export))]
31544pub struct VIDEO_STREAM_INFORMATION_DATA {
31545    #[doc = "Frame rate."]
31546    pub framerate: f32,
31547    #[doc = "Bit rate."]
31548    pub bitrate: u32,
31549    #[doc = "Bitmap of stream status flags."]
31550    pub flags: VideoStreamStatusFlags,
31551    #[doc = "Horizontal resolution."]
31552    pub resolution_h: u16,
31553    #[doc = "Vertical resolution."]
31554    pub resolution_v: u16,
31555    #[doc = "Video image rotation clockwise."]
31556    pub rotation: u16,
31557    #[doc = "Horizontal Field of view."]
31558    pub hfov: u16,
31559    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31560    pub stream_id: u8,
31561    #[doc = "Number of streams available."]
31562    pub count: u8,
31563    #[doc = "Type of stream."]
31564    pub mavtype: VideoStreamType,
31565    #[doc = "Stream name."]
31566    #[cfg_attr(feature = "ts", ts(type = "string"))]
31567    pub name: CharArray<32>,
31568    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
31569    #[cfg_attr(feature = "ts", ts(type = "string"))]
31570    pub uri: CharArray<160>,
31571    #[doc = "Encoding of stream."]
31572    #[cfg_attr(feature = "serde", serde(default))]
31573    pub encoding: VideoStreamEncoding,
31574    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31575    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31576    pub camera_device_id: u8,
31577}
31578impl VIDEO_STREAM_INFORMATION_DATA {
31579    pub const ENCODED_LEN: usize = 215usize;
31580    pub const DEFAULT: Self = Self {
31581        framerate: 0.0_f32,
31582        bitrate: 0_u32,
31583        flags: VideoStreamStatusFlags::DEFAULT,
31584        resolution_h: 0_u16,
31585        resolution_v: 0_u16,
31586        rotation: 0_u16,
31587        hfov: 0_u16,
31588        stream_id: 0_u8,
31589        count: 0_u8,
31590        mavtype: VideoStreamType::DEFAULT,
31591        name: CharArray::new([0_u8; 32usize]),
31592        uri: CharArray::new([0_u8; 160usize]),
31593        encoding: VideoStreamEncoding::DEFAULT,
31594        camera_device_id: 0_u8,
31595    };
31596    #[cfg(feature = "arbitrary")]
31597    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31598        use arbitrary::{Arbitrary, Unstructured};
31599        let mut buf = [0u8; 1024];
31600        rng.fill_bytes(&mut buf);
31601        let mut unstructured = Unstructured::new(&buf);
31602        Self::arbitrary(&mut unstructured).unwrap_or_default()
31603    }
31604}
31605impl Default for VIDEO_STREAM_INFORMATION_DATA {
31606    fn default() -> Self {
31607        Self::DEFAULT.clone()
31608    }
31609}
31610impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
31611    type Message = MavMessage;
31612    const ID: u32 = 269u32;
31613    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
31614    const EXTRA_CRC: u8 = 109u8;
31615    const ENCODED_LEN: usize = 215usize;
31616    fn deser(
31617        _version: MavlinkVersion,
31618        __input: &[u8],
31619    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31620        let avail_len = __input.len();
31621        let mut payload_buf = [0; Self::ENCODED_LEN];
31622        let mut buf = if avail_len < Self::ENCODED_LEN {
31623            payload_buf[0..avail_len].copy_from_slice(__input);
31624            Bytes::new(&payload_buf)
31625        } else {
31626            Bytes::new(__input)
31627        };
31628        let mut __struct = Self::default();
31629        __struct.framerate = buf.get_f32_le()?;
31630        __struct.bitrate = buf.get_u32_le()?;
31631        let tmp = buf.get_u16_le()?;
31632        __struct.flags =
31633            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
31634                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31635                    flag_type: "VideoStreamStatusFlags",
31636                    value: tmp as u64,
31637                })?;
31638        __struct.resolution_h = buf.get_u16_le()?;
31639        __struct.resolution_v = buf.get_u16_le()?;
31640        __struct.rotation = buf.get_u16_le()?;
31641        __struct.hfov = buf.get_u16_le()?;
31642        __struct.stream_id = buf.get_u8()?;
31643        __struct.count = buf.get_u8()?;
31644        let tmp = buf.get_u8()?;
31645        __struct.mavtype =
31646            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31647                enum_type: "VideoStreamType",
31648                value: tmp as u64,
31649            })?;
31650        let mut tmp = [0_u8; 32usize];
31651        for v in &mut tmp {
31652            *v = buf.get_u8()?;
31653        }
31654        __struct.name = CharArray::new(tmp);
31655        let mut tmp = [0_u8; 160usize];
31656        for v in &mut tmp {
31657            *v = buf.get_u8()?;
31658        }
31659        __struct.uri = CharArray::new(tmp);
31660        let tmp = buf.get_u8()?;
31661        __struct.encoding =
31662            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31663                enum_type: "VideoStreamEncoding",
31664                value: tmp as u64,
31665            })?;
31666        __struct.camera_device_id = buf.get_u8()?;
31667        Ok(__struct)
31668    }
31669    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31670        let mut __tmp = BytesMut::new(bytes);
31671        #[allow(clippy::absurd_extreme_comparisons)]
31672        #[allow(unused_comparisons)]
31673        if __tmp.remaining() < Self::ENCODED_LEN {
31674            panic!(
31675                "buffer is too small (need {} bytes, but got {})",
31676                Self::ENCODED_LEN,
31677                __tmp.remaining(),
31678            )
31679        }
31680        __tmp.put_f32_le(self.framerate);
31681        __tmp.put_u32_le(self.bitrate);
31682        __tmp.put_u16_le(self.flags.bits() as u16);
31683        __tmp.put_u16_le(self.resolution_h);
31684        __tmp.put_u16_le(self.resolution_v);
31685        __tmp.put_u16_le(self.rotation);
31686        __tmp.put_u16_le(self.hfov);
31687        __tmp.put_u8(self.stream_id);
31688        __tmp.put_u8(self.count);
31689        __tmp.put_u8(self.mavtype as u8);
31690        for val in &self.name {
31691            __tmp.put_u8(*val);
31692        }
31693        for val in &self.uri {
31694            __tmp.put_u8(*val);
31695        }
31696        if matches!(version, MavlinkVersion::V2) {
31697            __tmp.put_u8(self.encoding as u8);
31698            __tmp.put_u8(self.camera_device_id);
31699            let len = __tmp.len();
31700            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31701        } else {
31702            __tmp.len()
31703        }
31704    }
31705}
31706#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
31707#[doc = ""]
31708#[doc = "ID: 270"]
31709#[derive(Debug, Clone, PartialEq)]
31710#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31711#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31712#[cfg_attr(feature = "ts", derive(TS))]
31713#[cfg_attr(feature = "ts", ts(export))]
31714pub struct VIDEO_STREAM_STATUS_DATA {
31715    #[doc = "Frame rate"]
31716    pub framerate: f32,
31717    #[doc = "Bit rate"]
31718    pub bitrate: u32,
31719    #[doc = "Bitmap of stream status flags"]
31720    pub flags: VideoStreamStatusFlags,
31721    #[doc = "Horizontal resolution"]
31722    pub resolution_h: u16,
31723    #[doc = "Vertical resolution"]
31724    pub resolution_v: u16,
31725    #[doc = "Video image rotation clockwise"]
31726    pub rotation: u16,
31727    #[doc = "Horizontal Field of view"]
31728    pub hfov: u16,
31729    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31730    pub stream_id: u8,
31731    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31732    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31733    pub camera_device_id: u8,
31734}
31735impl VIDEO_STREAM_STATUS_DATA {
31736    pub const ENCODED_LEN: usize = 20usize;
31737    pub const DEFAULT: Self = Self {
31738        framerate: 0.0_f32,
31739        bitrate: 0_u32,
31740        flags: VideoStreamStatusFlags::DEFAULT,
31741        resolution_h: 0_u16,
31742        resolution_v: 0_u16,
31743        rotation: 0_u16,
31744        hfov: 0_u16,
31745        stream_id: 0_u8,
31746        camera_device_id: 0_u8,
31747    };
31748    #[cfg(feature = "arbitrary")]
31749    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31750        use arbitrary::{Arbitrary, Unstructured};
31751        let mut buf = [0u8; 1024];
31752        rng.fill_bytes(&mut buf);
31753        let mut unstructured = Unstructured::new(&buf);
31754        Self::arbitrary(&mut unstructured).unwrap_or_default()
31755    }
31756}
31757impl Default for VIDEO_STREAM_STATUS_DATA {
31758    fn default() -> Self {
31759        Self::DEFAULT.clone()
31760    }
31761}
31762impl MessageData for VIDEO_STREAM_STATUS_DATA {
31763    type Message = MavMessage;
31764    const ID: u32 = 270u32;
31765    const NAME: &'static str = "VIDEO_STREAM_STATUS";
31766    const EXTRA_CRC: u8 = 59u8;
31767    const ENCODED_LEN: usize = 20usize;
31768    fn deser(
31769        _version: MavlinkVersion,
31770        __input: &[u8],
31771    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31772        let avail_len = __input.len();
31773        let mut payload_buf = [0; Self::ENCODED_LEN];
31774        let mut buf = if avail_len < Self::ENCODED_LEN {
31775            payload_buf[0..avail_len].copy_from_slice(__input);
31776            Bytes::new(&payload_buf)
31777        } else {
31778            Bytes::new(__input)
31779        };
31780        let mut __struct = Self::default();
31781        __struct.framerate = buf.get_f32_le()?;
31782        __struct.bitrate = buf.get_u32_le()?;
31783        let tmp = buf.get_u16_le()?;
31784        __struct.flags =
31785            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
31786                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31787                    flag_type: "VideoStreamStatusFlags",
31788                    value: tmp as u64,
31789                })?;
31790        __struct.resolution_h = buf.get_u16_le()?;
31791        __struct.resolution_v = buf.get_u16_le()?;
31792        __struct.rotation = buf.get_u16_le()?;
31793        __struct.hfov = buf.get_u16_le()?;
31794        __struct.stream_id = buf.get_u8()?;
31795        __struct.camera_device_id = buf.get_u8()?;
31796        Ok(__struct)
31797    }
31798    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31799        let mut __tmp = BytesMut::new(bytes);
31800        #[allow(clippy::absurd_extreme_comparisons)]
31801        #[allow(unused_comparisons)]
31802        if __tmp.remaining() < Self::ENCODED_LEN {
31803            panic!(
31804                "buffer is too small (need {} bytes, but got {})",
31805                Self::ENCODED_LEN,
31806                __tmp.remaining(),
31807            )
31808        }
31809        __tmp.put_f32_le(self.framerate);
31810        __tmp.put_u32_le(self.bitrate);
31811        __tmp.put_u16_le(self.flags.bits() as u16);
31812        __tmp.put_u16_le(self.resolution_h);
31813        __tmp.put_u16_le(self.resolution_v);
31814        __tmp.put_u16_le(self.rotation);
31815        __tmp.put_u16_le(self.hfov);
31816        __tmp.put_u8(self.stream_id);
31817        if matches!(version, MavlinkVersion::V2) {
31818            __tmp.put_u8(self.camera_device_id);
31819            let len = __tmp.len();
31820            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31821        } else {
31822            __tmp.len()
31823        }
31824    }
31825}
31826#[doc = "Local position/attitude estimate from a vision source."]
31827#[doc = ""]
31828#[doc = "ID: 102"]
31829#[derive(Debug, Clone, PartialEq)]
31830#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31831#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31832#[cfg_attr(feature = "ts", derive(TS))]
31833#[cfg_attr(feature = "ts", ts(export))]
31834pub struct VISION_POSITION_ESTIMATE_DATA {
31835    #[doc = "Timestamp (UNIX time or time since system boot)"]
31836    pub usec: u64,
31837    #[doc = "Local X position"]
31838    pub x: f32,
31839    #[doc = "Local Y position"]
31840    pub y: f32,
31841    #[doc = "Local Z position"]
31842    pub z: f32,
31843    #[doc = "Roll angle"]
31844    pub roll: f32,
31845    #[doc = "Pitch angle"]
31846    pub pitch: f32,
31847    #[doc = "Yaw angle"]
31848    pub yaw: f32,
31849    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31850    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31851    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31852    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31853    pub covariance: [f32; 21],
31854    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31855    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31856    pub reset_counter: u8,
31857}
31858impl VISION_POSITION_ESTIMATE_DATA {
31859    pub const ENCODED_LEN: usize = 117usize;
31860    pub const DEFAULT: Self = Self {
31861        usec: 0_u64,
31862        x: 0.0_f32,
31863        y: 0.0_f32,
31864        z: 0.0_f32,
31865        roll: 0.0_f32,
31866        pitch: 0.0_f32,
31867        yaw: 0.0_f32,
31868        covariance: [0.0_f32; 21usize],
31869        reset_counter: 0_u8,
31870    };
31871    #[cfg(feature = "arbitrary")]
31872    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31873        use arbitrary::{Arbitrary, Unstructured};
31874        let mut buf = [0u8; 1024];
31875        rng.fill_bytes(&mut buf);
31876        let mut unstructured = Unstructured::new(&buf);
31877        Self::arbitrary(&mut unstructured).unwrap_or_default()
31878    }
31879}
31880impl Default for VISION_POSITION_ESTIMATE_DATA {
31881    fn default() -> Self {
31882        Self::DEFAULT.clone()
31883    }
31884}
31885impl MessageData for VISION_POSITION_ESTIMATE_DATA {
31886    type Message = MavMessage;
31887    const ID: u32 = 102u32;
31888    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
31889    const EXTRA_CRC: u8 = 158u8;
31890    const ENCODED_LEN: usize = 117usize;
31891    fn deser(
31892        _version: MavlinkVersion,
31893        __input: &[u8],
31894    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31895        let avail_len = __input.len();
31896        let mut payload_buf = [0; Self::ENCODED_LEN];
31897        let mut buf = if avail_len < Self::ENCODED_LEN {
31898            payload_buf[0..avail_len].copy_from_slice(__input);
31899            Bytes::new(&payload_buf)
31900        } else {
31901            Bytes::new(__input)
31902        };
31903        let mut __struct = Self::default();
31904        __struct.usec = buf.get_u64_le()?;
31905        __struct.x = buf.get_f32_le()?;
31906        __struct.y = buf.get_f32_le()?;
31907        __struct.z = buf.get_f32_le()?;
31908        __struct.roll = buf.get_f32_le()?;
31909        __struct.pitch = buf.get_f32_le()?;
31910        __struct.yaw = buf.get_f32_le()?;
31911        for v in &mut __struct.covariance {
31912            let val = buf.get_f32_le()?;
31913            *v = val;
31914        }
31915        __struct.reset_counter = buf.get_u8()?;
31916        Ok(__struct)
31917    }
31918    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31919        let mut __tmp = BytesMut::new(bytes);
31920        #[allow(clippy::absurd_extreme_comparisons)]
31921        #[allow(unused_comparisons)]
31922        if __tmp.remaining() < Self::ENCODED_LEN {
31923            panic!(
31924                "buffer is too small (need {} bytes, but got {})",
31925                Self::ENCODED_LEN,
31926                __tmp.remaining(),
31927            )
31928        }
31929        __tmp.put_u64_le(self.usec);
31930        __tmp.put_f32_le(self.x);
31931        __tmp.put_f32_le(self.y);
31932        __tmp.put_f32_le(self.z);
31933        __tmp.put_f32_le(self.roll);
31934        __tmp.put_f32_le(self.pitch);
31935        __tmp.put_f32_le(self.yaw);
31936        if matches!(version, MavlinkVersion::V2) {
31937            for val in &self.covariance {
31938                __tmp.put_f32_le(*val);
31939            }
31940            __tmp.put_u8(self.reset_counter);
31941            let len = __tmp.len();
31942            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31943        } else {
31944            __tmp.len()
31945        }
31946    }
31947}
31948#[doc = "Speed estimate from a vision source."]
31949#[doc = ""]
31950#[doc = "ID: 103"]
31951#[derive(Debug, Clone, PartialEq)]
31952#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31953#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31954#[cfg_attr(feature = "ts", derive(TS))]
31955#[cfg_attr(feature = "ts", ts(export))]
31956pub struct VISION_SPEED_ESTIMATE_DATA {
31957    #[doc = "Timestamp (UNIX time or time since system boot)"]
31958    pub usec: u64,
31959    #[doc = "Global X speed"]
31960    pub x: f32,
31961    #[doc = "Global Y speed"]
31962    pub y: f32,
31963    #[doc = "Global Z speed"]
31964    pub z: f32,
31965    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
31966    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31967    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31968    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31969    pub covariance: [f32; 9],
31970    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31971    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31972    pub reset_counter: u8,
31973}
31974impl VISION_SPEED_ESTIMATE_DATA {
31975    pub const ENCODED_LEN: usize = 57usize;
31976    pub const DEFAULT: Self = Self {
31977        usec: 0_u64,
31978        x: 0.0_f32,
31979        y: 0.0_f32,
31980        z: 0.0_f32,
31981        covariance: [0.0_f32; 9usize],
31982        reset_counter: 0_u8,
31983    };
31984    #[cfg(feature = "arbitrary")]
31985    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31986        use arbitrary::{Arbitrary, Unstructured};
31987        let mut buf = [0u8; 1024];
31988        rng.fill_bytes(&mut buf);
31989        let mut unstructured = Unstructured::new(&buf);
31990        Self::arbitrary(&mut unstructured).unwrap_or_default()
31991    }
31992}
31993impl Default for VISION_SPEED_ESTIMATE_DATA {
31994    fn default() -> Self {
31995        Self::DEFAULT.clone()
31996    }
31997}
31998impl MessageData for VISION_SPEED_ESTIMATE_DATA {
31999    type Message = MavMessage;
32000    const ID: u32 = 103u32;
32001    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
32002    const EXTRA_CRC: u8 = 208u8;
32003    const ENCODED_LEN: usize = 57usize;
32004    fn deser(
32005        _version: MavlinkVersion,
32006        __input: &[u8],
32007    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32008        let avail_len = __input.len();
32009        let mut payload_buf = [0; Self::ENCODED_LEN];
32010        let mut buf = if avail_len < Self::ENCODED_LEN {
32011            payload_buf[0..avail_len].copy_from_slice(__input);
32012            Bytes::new(&payload_buf)
32013        } else {
32014            Bytes::new(__input)
32015        };
32016        let mut __struct = Self::default();
32017        __struct.usec = buf.get_u64_le()?;
32018        __struct.x = buf.get_f32_le()?;
32019        __struct.y = buf.get_f32_le()?;
32020        __struct.z = buf.get_f32_le()?;
32021        for v in &mut __struct.covariance {
32022            let val = buf.get_f32_le()?;
32023            *v = val;
32024        }
32025        __struct.reset_counter = buf.get_u8()?;
32026        Ok(__struct)
32027    }
32028    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32029        let mut __tmp = BytesMut::new(bytes);
32030        #[allow(clippy::absurd_extreme_comparisons)]
32031        #[allow(unused_comparisons)]
32032        if __tmp.remaining() < Self::ENCODED_LEN {
32033            panic!(
32034                "buffer is too small (need {} bytes, but got {})",
32035                Self::ENCODED_LEN,
32036                __tmp.remaining(),
32037            )
32038        }
32039        __tmp.put_u64_le(self.usec);
32040        __tmp.put_f32_le(self.x);
32041        __tmp.put_f32_le(self.y);
32042        __tmp.put_f32_le(self.z);
32043        if matches!(version, MavlinkVersion::V2) {
32044            for val in &self.covariance {
32045                __tmp.put_f32_le(*val);
32046            }
32047            __tmp.put_u8(self.reset_counter);
32048            let len = __tmp.len();
32049            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32050        } else {
32051            __tmp.len()
32052        }
32053    }
32054}
32055#[doc = "Cumulative distance traveled for each reported wheel."]
32056#[doc = ""]
32057#[doc = "ID: 9000"]
32058#[derive(Debug, Clone, PartialEq)]
32059#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32060#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32061#[cfg_attr(feature = "ts", derive(TS))]
32062#[cfg_attr(feature = "ts", ts(export))]
32063pub struct WHEEL_DISTANCE_DATA {
32064    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32065    pub time_usec: u64,
32066    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
32067    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32068    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32069    pub distance: [f64; 16],
32070    #[doc = "Number of wheels reported."]
32071    pub count: u8,
32072}
32073impl WHEEL_DISTANCE_DATA {
32074    pub const ENCODED_LEN: usize = 137usize;
32075    pub const DEFAULT: Self = Self {
32076        time_usec: 0_u64,
32077        distance: [0.0_f64; 16usize],
32078        count: 0_u8,
32079    };
32080    #[cfg(feature = "arbitrary")]
32081    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32082        use arbitrary::{Arbitrary, Unstructured};
32083        let mut buf = [0u8; 1024];
32084        rng.fill_bytes(&mut buf);
32085        let mut unstructured = Unstructured::new(&buf);
32086        Self::arbitrary(&mut unstructured).unwrap_or_default()
32087    }
32088}
32089impl Default for WHEEL_DISTANCE_DATA {
32090    fn default() -> Self {
32091        Self::DEFAULT.clone()
32092    }
32093}
32094impl MessageData for WHEEL_DISTANCE_DATA {
32095    type Message = MavMessage;
32096    const ID: u32 = 9000u32;
32097    const NAME: &'static str = "WHEEL_DISTANCE";
32098    const EXTRA_CRC: u8 = 113u8;
32099    const ENCODED_LEN: usize = 137usize;
32100    fn deser(
32101        _version: MavlinkVersion,
32102        __input: &[u8],
32103    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32104        let avail_len = __input.len();
32105        let mut payload_buf = [0; Self::ENCODED_LEN];
32106        let mut buf = if avail_len < Self::ENCODED_LEN {
32107            payload_buf[0..avail_len].copy_from_slice(__input);
32108            Bytes::new(&payload_buf)
32109        } else {
32110            Bytes::new(__input)
32111        };
32112        let mut __struct = Self::default();
32113        __struct.time_usec = buf.get_u64_le()?;
32114        for v in &mut __struct.distance {
32115            let val = buf.get_f64_le()?;
32116            *v = val;
32117        }
32118        __struct.count = buf.get_u8()?;
32119        Ok(__struct)
32120    }
32121    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32122        let mut __tmp = BytesMut::new(bytes);
32123        #[allow(clippy::absurd_extreme_comparisons)]
32124        #[allow(unused_comparisons)]
32125        if __tmp.remaining() < Self::ENCODED_LEN {
32126            panic!(
32127                "buffer is too small (need {} bytes, but got {})",
32128                Self::ENCODED_LEN,
32129                __tmp.remaining(),
32130            )
32131        }
32132        __tmp.put_u64_le(self.time_usec);
32133        for val in &self.distance {
32134            __tmp.put_f64_le(*val);
32135        }
32136        __tmp.put_u8(self.count);
32137        if matches!(version, MavlinkVersion::V2) {
32138            let len = __tmp.len();
32139            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32140        } else {
32141            __tmp.len()
32142        }
32143    }
32144}
32145#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32146#[doc = ""]
32147#[doc = "ID: 299"]
32148#[derive(Debug, Clone, PartialEq)]
32149#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32150#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32151#[cfg_attr(feature = "ts", derive(TS))]
32152#[cfg_attr(feature = "ts", ts(export))]
32153pub struct WIFI_CONFIG_AP_DATA {
32154    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
32155    #[cfg_attr(feature = "ts", ts(type = "string"))]
32156    pub ssid: CharArray<32>,
32157    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
32158    #[cfg_attr(feature = "ts", ts(type = "string"))]
32159    pub password: CharArray<64>,
32160    #[doc = "WiFi Mode."]
32161    #[cfg_attr(feature = "serde", serde(default))]
32162    pub mode: WifiConfigApMode,
32163    #[doc = "Message acceptance response (sent back to GS)."]
32164    #[cfg_attr(feature = "serde", serde(default))]
32165    pub response: WifiConfigApResponse,
32166}
32167impl WIFI_CONFIG_AP_DATA {
32168    pub const ENCODED_LEN: usize = 98usize;
32169    pub const DEFAULT: Self = Self {
32170        ssid: CharArray::new([0_u8; 32usize]),
32171        password: CharArray::new([0_u8; 64usize]),
32172        mode: WifiConfigApMode::DEFAULT,
32173        response: WifiConfigApResponse::DEFAULT,
32174    };
32175    #[cfg(feature = "arbitrary")]
32176    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32177        use arbitrary::{Arbitrary, Unstructured};
32178        let mut buf = [0u8; 1024];
32179        rng.fill_bytes(&mut buf);
32180        let mut unstructured = Unstructured::new(&buf);
32181        Self::arbitrary(&mut unstructured).unwrap_or_default()
32182    }
32183}
32184impl Default for WIFI_CONFIG_AP_DATA {
32185    fn default() -> Self {
32186        Self::DEFAULT.clone()
32187    }
32188}
32189impl MessageData for WIFI_CONFIG_AP_DATA {
32190    type Message = MavMessage;
32191    const ID: u32 = 299u32;
32192    const NAME: &'static str = "WIFI_CONFIG_AP";
32193    const EXTRA_CRC: u8 = 19u8;
32194    const ENCODED_LEN: usize = 98usize;
32195    fn deser(
32196        _version: MavlinkVersion,
32197        __input: &[u8],
32198    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32199        let avail_len = __input.len();
32200        let mut payload_buf = [0; Self::ENCODED_LEN];
32201        let mut buf = if avail_len < Self::ENCODED_LEN {
32202            payload_buf[0..avail_len].copy_from_slice(__input);
32203            Bytes::new(&payload_buf)
32204        } else {
32205            Bytes::new(__input)
32206        };
32207        let mut __struct = Self::default();
32208        let mut tmp = [0_u8; 32usize];
32209        for v in &mut tmp {
32210            *v = buf.get_u8()?;
32211        }
32212        __struct.ssid = CharArray::new(tmp);
32213        let mut tmp = [0_u8; 64usize];
32214        for v in &mut tmp {
32215            *v = buf.get_u8()?;
32216        }
32217        __struct.password = CharArray::new(tmp);
32218        let tmp = buf.get_i8()?;
32219        __struct.mode =
32220            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32221                enum_type: "WifiConfigApMode",
32222                value: tmp as u64,
32223            })?;
32224        let tmp = buf.get_i8()?;
32225        __struct.response =
32226            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32227                enum_type: "WifiConfigApResponse",
32228                value: tmp as u64,
32229            })?;
32230        Ok(__struct)
32231    }
32232    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32233        let mut __tmp = BytesMut::new(bytes);
32234        #[allow(clippy::absurd_extreme_comparisons)]
32235        #[allow(unused_comparisons)]
32236        if __tmp.remaining() < Self::ENCODED_LEN {
32237            panic!(
32238                "buffer is too small (need {} bytes, but got {})",
32239                Self::ENCODED_LEN,
32240                __tmp.remaining(),
32241            )
32242        }
32243        for val in &self.ssid {
32244            __tmp.put_u8(*val);
32245        }
32246        for val in &self.password {
32247            __tmp.put_u8(*val);
32248        }
32249        if matches!(version, MavlinkVersion::V2) {
32250            __tmp.put_i8(self.mode as i8);
32251            __tmp.put_i8(self.response as i8);
32252            let len = __tmp.len();
32253            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32254        } else {
32255            __tmp.len()
32256        }
32257    }
32258}
32259#[doc = "Winch status."]
32260#[doc = ""]
32261#[doc = "ID: 9005"]
32262#[derive(Debug, Clone, PartialEq)]
32263#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32264#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32265#[cfg_attr(feature = "ts", derive(TS))]
32266#[cfg_attr(feature = "ts", ts(export))]
32267pub struct WINCH_STATUS_DATA {
32268    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32269    pub time_usec: u64,
32270    #[doc = "Length of line released. NaN if unknown"]
32271    pub line_length: f32,
32272    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
32273    pub speed: f32,
32274    #[doc = "Tension on the line. NaN if unknown"]
32275    pub tension: f32,
32276    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
32277    pub voltage: f32,
32278    #[doc = "Current draw from the winch. NaN if unknown"]
32279    pub current: f32,
32280    #[doc = "Status flags"]
32281    pub status: MavWinchStatusFlag,
32282    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
32283    pub temperature: i16,
32284}
32285impl WINCH_STATUS_DATA {
32286    pub const ENCODED_LEN: usize = 34usize;
32287    pub const DEFAULT: Self = Self {
32288        time_usec: 0_u64,
32289        line_length: 0.0_f32,
32290        speed: 0.0_f32,
32291        tension: 0.0_f32,
32292        voltage: 0.0_f32,
32293        current: 0.0_f32,
32294        status: MavWinchStatusFlag::DEFAULT,
32295        temperature: 0_i16,
32296    };
32297    #[cfg(feature = "arbitrary")]
32298    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32299        use arbitrary::{Arbitrary, Unstructured};
32300        let mut buf = [0u8; 1024];
32301        rng.fill_bytes(&mut buf);
32302        let mut unstructured = Unstructured::new(&buf);
32303        Self::arbitrary(&mut unstructured).unwrap_or_default()
32304    }
32305}
32306impl Default for WINCH_STATUS_DATA {
32307    fn default() -> Self {
32308        Self::DEFAULT.clone()
32309    }
32310}
32311impl MessageData for WINCH_STATUS_DATA {
32312    type Message = MavMessage;
32313    const ID: u32 = 9005u32;
32314    const NAME: &'static str = "WINCH_STATUS";
32315    const EXTRA_CRC: u8 = 117u8;
32316    const ENCODED_LEN: usize = 34usize;
32317    fn deser(
32318        _version: MavlinkVersion,
32319        __input: &[u8],
32320    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32321        let avail_len = __input.len();
32322        let mut payload_buf = [0; Self::ENCODED_LEN];
32323        let mut buf = if avail_len < Self::ENCODED_LEN {
32324            payload_buf[0..avail_len].copy_from_slice(__input);
32325            Bytes::new(&payload_buf)
32326        } else {
32327            Bytes::new(__input)
32328        };
32329        let mut __struct = Self::default();
32330        __struct.time_usec = buf.get_u64_le()?;
32331        __struct.line_length = buf.get_f32_le()?;
32332        __struct.speed = buf.get_f32_le()?;
32333        __struct.tension = buf.get_f32_le()?;
32334        __struct.voltage = buf.get_f32_le()?;
32335        __struct.current = buf.get_f32_le()?;
32336        let tmp = buf.get_u32_le()?;
32337        __struct.status = MavWinchStatusFlag::from_bits(tmp as <MavWinchStatusFlag as Flags>::Bits)
32338            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32339                flag_type: "MavWinchStatusFlag",
32340                value: tmp as u64,
32341            })?;
32342        __struct.temperature = buf.get_i16_le()?;
32343        Ok(__struct)
32344    }
32345    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32346        let mut __tmp = BytesMut::new(bytes);
32347        #[allow(clippy::absurd_extreme_comparisons)]
32348        #[allow(unused_comparisons)]
32349        if __tmp.remaining() < Self::ENCODED_LEN {
32350            panic!(
32351                "buffer is too small (need {} bytes, but got {})",
32352                Self::ENCODED_LEN,
32353                __tmp.remaining(),
32354            )
32355        }
32356        __tmp.put_u64_le(self.time_usec);
32357        __tmp.put_f32_le(self.line_length);
32358        __tmp.put_f32_le(self.speed);
32359        __tmp.put_f32_le(self.tension);
32360        __tmp.put_f32_le(self.voltage);
32361        __tmp.put_f32_le(self.current);
32362        __tmp.put_u32_le(self.status.bits() as u32);
32363        __tmp.put_i16_le(self.temperature);
32364        if matches!(version, MavlinkVersion::V2) {
32365            let len = __tmp.len();
32366            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32367        } else {
32368            __tmp.len()
32369        }
32370    }
32371}
32372#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
32373#[doc = ""]
32374#[doc = "ID: 231"]
32375#[derive(Debug, Clone, PartialEq)]
32376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32377#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32378#[cfg_attr(feature = "ts", derive(TS))]
32379#[cfg_attr(feature = "ts", ts(export))]
32380pub struct WIND_COV_DATA {
32381    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32382    pub time_usec: u64,
32383    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
32384    pub wind_x: f32,
32385    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
32386    pub wind_y: f32,
32387    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
32388    pub wind_z: f32,
32389    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32390    pub var_horiz: f32,
32391    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32392    pub var_vert: f32,
32393    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
32394    pub wind_alt: f32,
32395    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
32396    pub horiz_accuracy: f32,
32397    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
32398    pub vert_accuracy: f32,
32399}
32400impl WIND_COV_DATA {
32401    pub const ENCODED_LEN: usize = 40usize;
32402    pub const DEFAULT: Self = Self {
32403        time_usec: 0_u64,
32404        wind_x: 0.0_f32,
32405        wind_y: 0.0_f32,
32406        wind_z: 0.0_f32,
32407        var_horiz: 0.0_f32,
32408        var_vert: 0.0_f32,
32409        wind_alt: 0.0_f32,
32410        horiz_accuracy: 0.0_f32,
32411        vert_accuracy: 0.0_f32,
32412    };
32413    #[cfg(feature = "arbitrary")]
32414    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32415        use arbitrary::{Arbitrary, Unstructured};
32416        let mut buf = [0u8; 1024];
32417        rng.fill_bytes(&mut buf);
32418        let mut unstructured = Unstructured::new(&buf);
32419        Self::arbitrary(&mut unstructured).unwrap_or_default()
32420    }
32421}
32422impl Default for WIND_COV_DATA {
32423    fn default() -> Self {
32424        Self::DEFAULT.clone()
32425    }
32426}
32427impl MessageData for WIND_COV_DATA {
32428    type Message = MavMessage;
32429    const ID: u32 = 231u32;
32430    const NAME: &'static str = "WIND_COV";
32431    const EXTRA_CRC: u8 = 105u8;
32432    const ENCODED_LEN: usize = 40usize;
32433    fn deser(
32434        _version: MavlinkVersion,
32435        __input: &[u8],
32436    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32437        let avail_len = __input.len();
32438        let mut payload_buf = [0; Self::ENCODED_LEN];
32439        let mut buf = if avail_len < Self::ENCODED_LEN {
32440            payload_buf[0..avail_len].copy_from_slice(__input);
32441            Bytes::new(&payload_buf)
32442        } else {
32443            Bytes::new(__input)
32444        };
32445        let mut __struct = Self::default();
32446        __struct.time_usec = buf.get_u64_le()?;
32447        __struct.wind_x = buf.get_f32_le()?;
32448        __struct.wind_y = buf.get_f32_le()?;
32449        __struct.wind_z = buf.get_f32_le()?;
32450        __struct.var_horiz = buf.get_f32_le()?;
32451        __struct.var_vert = buf.get_f32_le()?;
32452        __struct.wind_alt = buf.get_f32_le()?;
32453        __struct.horiz_accuracy = buf.get_f32_le()?;
32454        __struct.vert_accuracy = buf.get_f32_le()?;
32455        Ok(__struct)
32456    }
32457    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32458        let mut __tmp = BytesMut::new(bytes);
32459        #[allow(clippy::absurd_extreme_comparisons)]
32460        #[allow(unused_comparisons)]
32461        if __tmp.remaining() < Self::ENCODED_LEN {
32462            panic!(
32463                "buffer is too small (need {} bytes, but got {})",
32464                Self::ENCODED_LEN,
32465                __tmp.remaining(),
32466            )
32467        }
32468        __tmp.put_u64_le(self.time_usec);
32469        __tmp.put_f32_le(self.wind_x);
32470        __tmp.put_f32_le(self.wind_y);
32471        __tmp.put_f32_le(self.wind_z);
32472        __tmp.put_f32_le(self.var_horiz);
32473        __tmp.put_f32_le(self.var_vert);
32474        __tmp.put_f32_le(self.wind_alt);
32475        __tmp.put_f32_le(self.horiz_accuracy);
32476        __tmp.put_f32_le(self.vert_accuracy);
32477        if matches!(version, MavlinkVersion::V2) {
32478            let len = __tmp.len();
32479            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32480        } else {
32481            __tmp.len()
32482        }
32483    }
32484}
32485#[derive(Clone, PartialEq, Debug)]
32486#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32487#[cfg_attr(feature = "serde", serde(tag = "type"))]
32488#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32489#[cfg_attr(feature = "ts", derive(TS))]
32490#[cfg_attr(feature = "ts", ts(export))]
32491#[repr(u32)]
32492pub enum MavMessage {
32493    #[doc = "Set the vehicle attitude and body angular rates."]
32494    #[doc = ""]
32495    #[doc = "ID: 140"]
32496    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
32497    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
32498    #[doc = ""]
32499    #[doc = "ID: 375"]
32500    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
32501    #[doc = "The location and information of an ADSB vehicle."]
32502    #[doc = ""]
32503    #[doc = "ID: 246"]
32504    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
32505    #[doc = "The location and information of an AIS vessel."]
32506    #[doc = ""]
32507    #[doc = "ID: 301"]
32508    AIS_VESSEL(AIS_VESSEL_DATA),
32509    #[doc = "The current system altitude."]
32510    #[doc = ""]
32511    #[doc = "ID: 141"]
32512    ALTITUDE(ALTITUDE_DATA),
32513    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
32514    #[doc = ""]
32515    #[doc = "ID: 30"]
32516    ATTITUDE(ATTITUDE_DATA),
32517    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32518    #[doc = ""]
32519    #[doc = "ID: 31"]
32520    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
32521    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32522    #[doc = ""]
32523    #[doc = "ID: 61"]
32524    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
32525    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
32526    #[doc = ""]
32527    #[doc = "ID: 83"]
32528    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
32529    #[doc = "Motion capture attitude and position."]
32530    #[doc = ""]
32531    #[doc = "ID: 138"]
32532    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
32533    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
32534    #[doc = ""]
32535    #[doc = "ID: 7"]
32536    AUTH_KEY(AUTH_KEY_DATA),
32537    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
32538    #[doc = ""]
32539    #[doc = "ID: 286"]
32540    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
32541    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
32542    #[doc = ""]
32543    #[doc = "ID: 148"]
32544    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
32545    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
32546    #[doc = ""]
32547    #[doc = "ID: 435"]
32548    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
32549    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
32550    #[doc = ""]
32551    #[doc = "ID: 437"]
32552    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
32553    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
32554    #[doc = ""]
32555    #[doc = "ID: 372"]
32556    BATTERY_INFO(BATTERY_INFO_DATA),
32557    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
32558    #[doc = ""]
32559    #[doc = "ID: 147"]
32560    BATTERY_STATUS(BATTERY_STATUS_DATA),
32561    #[doc = "Report button state change."]
32562    #[doc = ""]
32563    #[doc = "ID: 257"]
32564    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
32565    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32566    #[doc = ""]
32567    #[doc = "ID: 262"]
32568    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
32569    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32570    #[doc = ""]
32571    #[doc = "ID: 271"]
32572    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
32573    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
32574    #[doc = ""]
32575    #[doc = "ID: 263"]
32576    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
32577    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32578    #[doc = ""]
32579    #[doc = "ID: 259"]
32580    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
32581    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32582    #[doc = ""]
32583    #[doc = "ID: 260"]
32584    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
32585    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
32586    #[doc = ""]
32587    #[doc = "ID: 277"]
32588    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
32589    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32590    #[doc = ""]
32591    #[doc = "ID: 276"]
32592    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
32593    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32594    #[doc = ""]
32595    #[doc = "ID: 275"]
32596    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
32597    #[doc = "Camera-IMU triggering and synchronisation message."]
32598    #[doc = ""]
32599    #[doc = "ID: 112"]
32600    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
32601    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
32602    #[doc = ""]
32603    #[doc = "ID: 387"]
32604    CANFD_FRAME(CANFD_FRAME_DATA),
32605    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
32606    #[doc = ""]
32607    #[doc = "ID: 388"]
32608    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
32609    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
32610    #[doc = ""]
32611    #[doc = "ID: 386"]
32612    CAN_FRAME(CAN_FRAME_DATA),
32613    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32614    #[doc = ""]
32615    #[doc = "ID: 336"]
32616    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
32617    #[doc = "Report current used cellular network status."]
32618    #[doc = ""]
32619    #[doc = "ID: 334"]
32620    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
32621    #[doc = "Request to control this MAV."]
32622    #[doc = ""]
32623    #[doc = "ID: 5"]
32624    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
32625    #[doc = "Accept / deny control of this MAV."]
32626    #[doc = ""]
32627    #[doc = "ID: 6"]
32628    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
32629    #[doc = "Information about a potential collision."]
32630    #[doc = ""]
32631    #[doc = "ID: 247"]
32632    COLLISION(COLLISION_DATA),
32633    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32634    #[doc = ""]
32635    #[doc = "ID: 77"]
32636    COMMAND_ACK(COMMAND_ACK_DATA),
32637    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32638    #[doc = ""]
32639    #[doc = "ID: 80"]
32640    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
32641    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32642    #[doc = ""]
32643    #[doc = "ID: 75"]
32644    COMMAND_INT(COMMAND_INT_DATA),
32645    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32646    #[doc = ""]
32647    #[doc = "ID: 76"]
32648    COMMAND_LONG(COMMAND_LONG_DATA),
32649    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
32650    #[doc = ""]
32651    #[doc = "ID: 395"]
32652    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
32653    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
32654    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
32655    #[doc = ""]
32656    #[doc = "ID: 396"]
32657    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
32658    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
32659    #[doc = ""]
32660    #[doc = "ID: 397"]
32661    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
32662    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
32663    #[doc = ""]
32664    #[doc = "ID: 146"]
32665    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
32666    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
32667    #[doc = ""]
32668    #[doc = "ID: 411"]
32669    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
32670    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
32671    #[doc = ""]
32672    #[doc = "ID: 436"]
32673    CURRENT_MODE(CURRENT_MODE_DATA),
32674    #[doc = "Data stream status information."]
32675    #[doc = ""]
32676    #[doc = "ID: 67"]
32677    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
32678    DATA_STREAM(DATA_STREAM_DATA),
32679    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32680    #[doc = ""]
32681    #[doc = "ID: 130"]
32682    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
32683    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
32684    #[doc = ""]
32685    #[doc = "ID: 254"]
32686    DEBUG(DEBUG_DATA),
32687    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
32688    #[doc = ""]
32689    #[doc = "ID: 350"]
32690    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
32691    #[doc = "To debug something using a named 3D vector."]
32692    #[doc = ""]
32693    #[doc = "ID: 250"]
32694    DEBUG_VECT(DEBUG_VECT_DATA),
32695    #[doc = "Distance sensor information for an onboard rangefinder."]
32696    #[doc = ""]
32697    #[doc = "ID: 132"]
32698    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
32699    #[doc = "EFI status output."]
32700    #[doc = ""]
32701    #[doc = "ID: 225"]
32702    EFI_STATUS(EFI_STATUS_DATA),
32703    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32704    #[doc = ""]
32705    #[doc = "ID: 131"]
32706    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
32707    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
32708    #[doc = ""]
32709    #[doc = "ID: 290"]
32710    ESC_INFO(ESC_INFO_DATA),
32711    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
32712    #[doc = ""]
32713    #[doc = "ID: 291"]
32714    ESC_STATUS(ESC_STATUS_DATA),
32715    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
32716    #[doc = ""]
32717    #[doc = "ID: 230"]
32718    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
32719    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
32720    #[doc = ""]
32721    #[doc = "ID: 410"]
32722    EVENT(EVENT_DATA),
32723    #[doc = "Provides state for additional features."]
32724    #[doc = ""]
32725    #[doc = "ID: 245"]
32726    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
32727    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
32728    #[doc = ""]
32729    #[doc = "ID: 162"]
32730    FENCE_STATUS(FENCE_STATUS_DATA),
32731    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
32732    #[doc = ""]
32733    #[doc = "ID: 110"]
32734    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
32735    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
32736    #[doc = ""]
32737    #[doc = "ID: 264"]
32738    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
32739    #[doc = "Current motion information from a designated system."]
32740    #[doc = ""]
32741    #[doc = "ID: 144"]
32742    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
32743    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
32744    #[doc = ""]
32745    #[doc = "ID: 371"]
32746    FUEL_STATUS(FUEL_STATUS_DATA),
32747    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
32748    #[doc = ""]
32749    #[doc = "ID: 373"]
32750    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
32751    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
32752    #[doc = ""]
32753    #[doc = "ID: 285"]
32754    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
32755    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
32756    #[doc = ""]
32757    #[doc = "ID: 283"]
32758    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
32759    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
32760    #[doc = ""]
32761    #[doc = "ID: 284"]
32762    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
32763    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
32764    #[doc = ""]
32765    #[doc = "ID: 280"]
32766    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
32767    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32768    #[doc = ""]
32769    #[doc = "ID: 282"]
32770    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
32771    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32772    #[doc = ""]
32773    #[doc = "ID: 288"]
32774    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
32775    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
32776    #[doc = ""]
32777    #[doc = "ID: 287"]
32778    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
32779    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
32780    #[doc = ""]
32781    #[doc = "ID: 281"]
32782    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
32783    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
32784    #[doc = ""]
32785    #[doc = "ID: 33"]
32786    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
32787    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
32788    #[doc = ""]
32789    #[doc = "ID: 63"]
32790    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
32791    #[doc = "Global position/attitude estimate from a vision source."]
32792    #[doc = ""]
32793    #[doc = "ID: 101"]
32794    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
32795    #[doc = "Second GPS data."]
32796    #[doc = ""]
32797    #[doc = "ID: 124"]
32798    GPS2_RAW(GPS2_RAW_DATA),
32799    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32800    #[doc = ""]
32801    #[doc = "ID: 128"]
32802    GPS2_RTK(GPS2_RTK_DATA),
32803    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
32804    #[doc = ""]
32805    #[doc = "ID: 49"]
32806    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
32807    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
32808    #[doc = ""]
32809    #[doc = "ID: 123"]
32810    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
32811    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
32812    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
32813    #[doc = ""]
32814    #[doc = "ID: 232"]
32815    GPS_INPUT(GPS_INPUT_DATA),
32816    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32817    #[doc = ""]
32818    #[doc = "ID: 24"]
32819    GPS_RAW_INT(GPS_RAW_INT_DATA),
32820    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
32821    #[doc = ""]
32822    #[doc = "ID: 233"]
32823    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
32824    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32825    #[doc = ""]
32826    #[doc = "ID: 127"]
32827    GPS_RTK(GPS_RTK_DATA),
32828    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
32829    #[doc = ""]
32830    #[doc = "ID: 25"]
32831    GPS_STATUS(GPS_STATUS_DATA),
32832    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
32833    #[doc = ""]
32834    #[doc = "ID: 0"]
32835    HEARTBEAT(HEARTBEAT_DATA),
32836    #[doc = "The IMU readings in SI units in NED body frame."]
32837    #[doc = ""]
32838    #[doc = "ID: 105"]
32839    HIGHRES_IMU(HIGHRES_IMU_DATA),
32840    #[doc = "Message appropriate for high latency connections like Iridium."]
32841    #[doc = ""]
32842    #[doc = "ID: 234"]
32843    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
32844    HIGH_LATENCY(HIGH_LATENCY_DATA),
32845    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
32846    #[doc = ""]
32847    #[doc = "ID: 235"]
32848    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
32849    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
32850    #[doc = ""]
32851    #[doc = "ID: 93"]
32852    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
32853    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
32854    #[doc = ""]
32855    #[doc = "ID: 91"]
32856    HIL_CONTROLS(HIL_CONTROLS_DATA),
32857    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32858    #[doc = ""]
32859    #[doc = "ID: 113"]
32860    HIL_GPS(HIL_GPS_DATA),
32861    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
32862    #[doc = ""]
32863    #[doc = "ID: 114"]
32864    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
32865    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
32866    #[doc = ""]
32867    #[doc = "ID: 92"]
32868    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
32869    #[doc = "The IMU readings in SI units in NED body frame."]
32870    #[doc = ""]
32871    #[doc = "ID: 107"]
32872    HIL_SENSOR(HIL_SENSOR_DATA),
32873    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32874    #[doc = ""]
32875    #[doc = "ID: 90"]
32876    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
32877    HIL_STATE(HIL_STATE_DATA),
32878    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32879    #[doc = ""]
32880    #[doc = "ID: 115"]
32881    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
32882    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
32883    #[doc = ""]
32884    #[doc = "ID: 242"]
32885    HOME_POSITION(HOME_POSITION_DATA),
32886    #[doc = "Temperature and humidity from hygrometer."]
32887    #[doc = ""]
32888    #[doc = "ID: 12920"]
32889    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
32890    #[doc = "Illuminator status."]
32891    #[doc = ""]
32892    #[doc = "ID: 440"]
32893    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
32894    #[doc = "Status of the Iridium SBD link."]
32895    #[doc = ""]
32896    #[doc = "ID: 335"]
32897    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
32898    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
32899    #[doc = ""]
32900    #[doc = "ID: 149"]
32901    LANDING_TARGET(LANDING_TARGET_DATA),
32902    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
32903    #[doc = ""]
32904    #[doc = "ID: 8"]
32905    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
32906    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32907    #[doc = ""]
32908    #[doc = "ID: 32"]
32909    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
32910    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32911    #[doc = ""]
32912    #[doc = "ID: 64"]
32913    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
32914    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32915    #[doc = ""]
32916    #[doc = "ID: 89"]
32917    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
32918    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
32919    #[doc = ""]
32920    #[doc = "ID: 268"]
32921    LOGGING_ACK(LOGGING_ACK_DATA),
32922    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
32923    #[doc = ""]
32924    #[doc = "ID: 266"]
32925    LOGGING_DATA(LOGGING_DATA_DATA),
32926    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
32927    #[doc = ""]
32928    #[doc = "ID: 267"]
32929    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
32930    #[doc = "Reply to LOG_REQUEST_DATA."]
32931    #[doc = ""]
32932    #[doc = "ID: 120"]
32933    LOG_DATA(LOG_DATA_DATA),
32934    #[doc = "Reply to LOG_REQUEST_LIST."]
32935    #[doc = ""]
32936    #[doc = "ID: 118"]
32937    LOG_ENTRY(LOG_ENTRY_DATA),
32938    #[doc = "Erase all logs."]
32939    #[doc = ""]
32940    #[doc = "ID: 121"]
32941    LOG_ERASE(LOG_ERASE_DATA),
32942    #[doc = "Request a chunk of a log."]
32943    #[doc = ""]
32944    #[doc = "ID: 119"]
32945    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
32946    #[doc = "Stop log transfer and resume normal logging."]
32947    #[doc = ""]
32948    #[doc = "ID: 122"]
32949    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
32950    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
32951    #[doc = ""]
32952    #[doc = "ID: 117"]
32953    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
32954    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
32955    #[doc = ""]
32956    #[doc = "ID: 192"]
32957    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
32958    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
32959    #[doc = ""]
32960    #[doc = "ID: 69"]
32961    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
32962    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
32963    #[doc = ""]
32964    #[doc = "ID: 81"]
32965    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
32966    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
32967    #[doc = ""]
32968    #[doc = "ID: 249"]
32969    MEMORY_VECT(MEMORY_VECT_DATA),
32970    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
32971    #[doc = ""]
32972    #[doc = "ID: 244"]
32973    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
32974    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
32975    #[doc = ""]
32976    #[doc = "ID: 47"]
32977    MISSION_ACK(MISSION_ACK_DATA),
32978    #[doc = "Delete all mission items at once."]
32979    #[doc = ""]
32980    #[doc = "ID: 45"]
32981    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
32982    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
32983    #[doc = ""]
32984    #[doc = "ID: 44"]
32985    MISSION_COUNT(MISSION_COUNT_DATA),
32986    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
32987    #[doc = ""]
32988    #[doc = "ID: 42"]
32989    MISSION_CURRENT(MISSION_CURRENT_DATA),
32990    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
32991    #[doc = ""]
32992    #[doc = "ID: 39"]
32993    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
32994    MISSION_ITEM(MISSION_ITEM_DATA),
32995    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
32996    #[doc = ""]
32997    #[doc = "ID: 73"]
32998    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
32999    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
33000    #[doc = ""]
33001    #[doc = "ID: 46"]
33002    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
33003    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
33004    #[doc = ""]
33005    #[doc = "ID: 40"]
33006    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
33007    MISSION_REQUEST(MISSION_REQUEST_DATA),
33008    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
33009    #[doc = ""]
33010    #[doc = "ID: 51"]
33011    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
33012    #[doc = "Request the overall list of mission items from the system/component."]
33013    #[doc = ""]
33014    #[doc = "ID: 43"]
33015    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
33016    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
33017    #[doc = ""]
33018    #[doc = "ID: 37"]
33019    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
33020    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
33021    #[doc = ""]
33022    #[doc = "ID: 41"]
33023    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
33024    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
33025    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
33026    #[doc = ""]
33027    #[doc = "ID: 38"]
33028    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
33029    #[doc = "Orientation of a mount."]
33030    #[doc = ""]
33031    #[doc = "ID: 265"]
33032    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
33033    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
33034    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33035    #[doc = ""]
33036    #[doc = "ID: 251"]
33037    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
33038    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33039    #[doc = ""]
33040    #[doc = "ID: 252"]
33041    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
33042    #[doc = "The state of the navigation and position controller."]
33043    #[doc = ""]
33044    #[doc = "ID: 62"]
33045    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
33046    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
33047    #[doc = ""]
33048    #[doc = "ID: 330"]
33049    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
33050    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
33051    #[doc = ""]
33052    #[doc = "ID: 331"]
33053    ODOMETRY(ODOMETRY_DATA),
33054    #[doc = "Hardware status sent by an onboard computer."]
33055    #[doc = ""]
33056    #[doc = "ID: 390"]
33057    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
33058    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
33059    #[doc = ""]
33060    #[doc = "ID: 12918"]
33061    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
33062    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
33063    #[doc = ""]
33064    #[doc = "ID: 12902"]
33065    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
33066    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
33067    #[doc = ""]
33068    #[doc = "ID: 12900"]
33069    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
33070    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
33071    #[doc = ""]
33072    #[doc = "ID: 12901"]
33073    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
33074    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
33075    #[doc = ""]
33076    #[doc = "ID: 12915"]
33077    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
33078    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
33079    #[doc = ""]
33080    #[doc = "ID: 12905"]
33081    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
33082    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
33083    #[doc = ""]
33084    #[doc = "ID: 12903"]
33085    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
33086    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
33087    #[doc = ""]
33088    #[doc = "ID: 12904"]
33089    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
33090    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
33091    #[doc = ""]
33092    #[doc = "ID: 12919"]
33093    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
33094    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
33095    #[doc = ""]
33096    #[doc = "ID: 100"]
33097    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
33098    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
33099    #[doc = ""]
33100    #[doc = "ID: 106"]
33101    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
33102    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
33103    #[doc = ""]
33104    #[doc = "ID: 360"]
33105    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
33106    #[doc = "Response from a PARAM_EXT_SET message."]
33107    #[doc = ""]
33108    #[doc = "ID: 324"]
33109    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
33110    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
33111    #[doc = ""]
33112    #[doc = "ID: 321"]
33113    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
33114    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
33115    #[doc = ""]
33116    #[doc = "ID: 320"]
33117    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
33118    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
33119    #[doc = ""]
33120    #[doc = "ID: 323"]
33121    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
33122    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
33123    #[doc = ""]
33124    #[doc = "ID: 322"]
33125    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
33126    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
33127    #[doc = ""]
33128    #[doc = "ID: 50"]
33129    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
33130    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33131    #[doc = ""]
33132    #[doc = "ID: 21"]
33133    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
33134    #[doc = "Request to read the onboard parameter with the param_id string id. Onboard parameters are stored as key[const char*] -&gt;value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
33135    #[doc = ""]
33136    #[doc = "ID: 20"]
33137    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
33138    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33139    #[doc = ""]
33140    #[doc = "ID: 23"]
33141    PARAM_SET(PARAM_SET_DATA),
33142    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33143    #[doc = ""]
33144    #[doc = "ID: 22"]
33145    PARAM_VALUE(PARAM_VALUE_DATA),
33146    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
33147    #[doc = ""]
33148    #[doc = "ID: 4"]
33149    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
33150    PING(PING_DATA),
33151    #[doc = "Control vehicle tone generation (buzzer)."]
33152    #[doc = ""]
33153    #[doc = "ID: 258"]
33154    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
33155    PLAY_TUNE(PLAY_TUNE_DATA),
33156    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
33157    #[doc = ""]
33158    #[doc = "ID: 400"]
33159    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
33160    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
33161    #[doc = ""]
33162    #[doc = "ID: 87"]
33163    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
33164    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
33165    #[doc = ""]
33166    #[doc = "ID: 85"]
33167    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
33168    #[doc = "Power supply status."]
33169    #[doc = ""]
33170    #[doc = "ID: 125"]
33171    POWER_STATUS(POWER_STATUS_DATA),
33172    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
33173    #[doc = ""]
33174    #[doc = "ID: 300"]
33175    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
33176    #[doc = "Status generated by radio and injected into MAVLink stream."]
33177    #[doc = ""]
33178    #[doc = "ID: 109"]
33179    RADIO_STATUS(RADIO_STATUS_DATA),
33180    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
33181    #[doc = ""]
33182    #[doc = "ID: 27"]
33183    RAW_IMU(RAW_IMU_DATA),
33184    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
33185    #[doc = ""]
33186    #[doc = "ID: 28"]
33187    RAW_PRESSURE(RAW_PRESSURE_DATA),
33188    #[doc = "RPM sensor data message."]
33189    #[doc = ""]
33190    #[doc = "ID: 339"]
33191    RAW_RPM(RAW_RPM_DATA),
33192    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33193    #[doc = ""]
33194    #[doc = "ID: 65"]
33195    RC_CHANNELS(RC_CHANNELS_DATA),
33196    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
33197    #[doc = ""]
33198    #[doc = "ID: 70"]
33199    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
33200    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33201    #[doc = ""]
33202    #[doc = "ID: 35"]
33203    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
33204    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
33205    #[doc = ""]
33206    #[doc = "ID: 34"]
33207    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
33208    #[doc = "Request a data stream."]
33209    #[doc = ""]
33210    #[doc = "ID: 66"]
33211    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
33212    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
33213    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
33214    #[doc = ""]
33215    #[doc = "ID: 412"]
33216    REQUEST_EVENT(REQUEST_EVENT_DATA),
33217    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
33218    #[doc = ""]
33219    #[doc = "ID: 142"]
33220    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
33221    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
33222    #[doc = ""]
33223    #[doc = "ID: 413"]
33224    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
33225    #[doc = "Read out the safety zone the MAV currently assumes."]
33226    #[doc = ""]
33227    #[doc = "ID: 55"]
33228    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
33229    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
33230    #[doc = ""]
33231    #[doc = "ID: 54"]
33232    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
33233    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
33234    #[doc = ""]
33235    #[doc = "ID: 26"]
33236    SCALED_IMU(SCALED_IMU_DATA),
33237    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
33238    #[doc = ""]
33239    #[doc = "ID: 116"]
33240    SCALED_IMU2(SCALED_IMU2_DATA),
33241    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
33242    #[doc = ""]
33243    #[doc = "ID: 129"]
33244    SCALED_IMU3(SCALED_IMU3_DATA),
33245    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
33246    #[doc = ""]
33247    #[doc = "ID: 29"]
33248    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
33249    #[doc = "Barometer readings for 2nd barometer."]
33250    #[doc = ""]
33251    #[doc = "ID: 137"]
33252    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
33253    #[doc = "Barometer readings for 3rd barometer."]
33254    #[doc = ""]
33255    #[doc = "ID: 143"]
33256    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
33257    #[doc = "This message is emitted as response to SCRIPT_REQUEST_LIST by the MAV to get the number of mission scripts."]
33258    #[doc = ""]
33259    #[doc = "ID: 183"]
33260    SCRIPT_COUNT(SCRIPT_COUNT_DATA),
33261    #[doc = "This message informs about the currently active SCRIPT."]
33262    #[doc = ""]
33263    #[doc = "ID: 184"]
33264    SCRIPT_CURRENT(SCRIPT_CURRENT_DATA),
33265    #[doc = "Message encoding a mission script item. This message is emitted upon a request for the next script item."]
33266    #[doc = ""]
33267    #[doc = "ID: 180"]
33268    SCRIPT_ITEM(SCRIPT_ITEM_DATA),
33269    #[doc = "Request script item with the sequence number seq. The response of the system to this message should be a SCRIPT_ITEM message."]
33270    #[doc = ""]
33271    #[doc = "ID: 181"]
33272    SCRIPT_REQUEST(SCRIPT_REQUEST_DATA),
33273    #[doc = "Request the overall list of mission items from the system/component."]
33274    #[doc = ""]
33275    #[doc = "ID: 182"]
33276    SCRIPT_REQUEST_LIST(SCRIPT_REQUEST_LIST_DATA),
33277    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
33278    #[doc = ""]
33279    #[doc = "ID: 126"]
33280    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
33281    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
33282    #[doc = ""]
33283    #[doc = "ID: 36"]
33284    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
33285    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
33286    #[doc = ""]
33287    #[doc = "ID: 256"]
33288    SETUP_SIGNING(SETUP_SIGNING_DATA),
33289    #[doc = "Set the vehicle attitude and body angular rates."]
33290    #[doc = ""]
33291    #[doc = "ID: 139"]
33292    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
33293    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
33294    #[doc = ""]
33295    #[doc = "ID: 82"]
33296    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
33297    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
33298    #[doc = ""]
33299    #[doc = "ID: 48"]
33300    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
33301    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
33302    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
33303    #[doc = ""]
33304    #[doc = "ID: 243"]
33305    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
33306    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
33307    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
33308    #[doc = ""]
33309    #[doc = "ID: 11"]
33310    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
33311    SET_MODE(SET_MODE_DATA),
33312    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
33313    #[doc = ""]
33314    #[doc = "ID: 86"]
33315    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
33316    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
33317    #[doc = ""]
33318    #[doc = "ID: 84"]
33319    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
33320    #[doc = "Status of simulation environment, if used."]
33321    #[doc = ""]
33322    #[doc = "ID: 108"]
33323    SIM_STATE(SIM_STATE_DATA),
33324    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
33325    #[doc = ""]
33326    #[doc = "ID: 370"]
33327    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
33328    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
33329    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
33330    #[doc = ""]
33331    #[doc = "ID: 253"]
33332    STATUSTEXT(STATUSTEXT_DATA),
33333    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
33334    #[doc = ""]
33335    #[doc = "ID: 261"]
33336    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
33337    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
33338    #[doc = ""]
33339    #[doc = "ID: 401"]
33340    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
33341    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
33342    #[doc = ""]
33343    #[doc = "ID: 2"]
33344    SYSTEM_TIME(SYSTEM_TIME_DATA),
33345    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
33346    #[doc = ""]
33347    #[doc = "ID: 1"]
33348    SYS_STATUS(SYS_STATUS_DATA),
33349    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
33350    #[doc = ""]
33351    #[doc = "ID: 135"]
33352    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
33353    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33354    #[doc = ""]
33355    #[doc = "ID: 134"]
33356    TERRAIN_DATA(TERRAIN_DATA_DATA),
33357    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33358    #[doc = ""]
33359    #[doc = "ID: 136"]
33360    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
33361    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33362    #[doc = ""]
33363    #[doc = "ID: 133"]
33364    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
33365    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
33366    #[doc = ""]
33367    #[doc = "ID: 111"]
33368    TIMESYNC(TIMESYNC_DATA),
33369    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
33370    #[doc = ""]
33371    #[doc = "ID: 380"]
33372    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
33373    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
33374    #[doc = ""]
33375    #[doc = "ID: 333"]
33376    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
33377    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
33378    #[doc = ""]
33379    #[doc = "ID: 332"]
33380    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
33381    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
33382    #[doc = ""]
33383    #[doc = "ID: 385"]
33384    TUNNEL(TUNNEL_DATA),
33385    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
33386    #[doc = ""]
33387    #[doc = "ID: 311"]
33388    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
33389    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
33390    #[doc = ""]
33391    #[doc = "ID: 310"]
33392    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
33393    #[doc = "The global position resulting from GPS and sensor fusion."]
33394    #[doc = ""]
33395    #[doc = "ID: 340"]
33396    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
33397    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
33398    #[doc = ""]
33399    #[doc = "ID: 248"]
33400    V2_EXTENSION(V2_EXTENSION_DATA),
33401    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
33402    #[doc = ""]
33403    #[doc = "ID: 74"]
33404    VFR_HUD(VFR_HUD_DATA),
33405    #[doc = "Vibration levels and accelerometer clipping."]
33406    #[doc = ""]
33407    #[doc = "ID: 241"]
33408    VIBRATION(VIBRATION_DATA),
33409    #[doc = "Global position estimate from a Vicon motion system source."]
33410    #[doc = ""]
33411    #[doc = "ID: 104"]
33412    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
33413    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
33414    #[doc = ""]
33415    #[doc = "ID: 269"]
33416    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
33417    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
33418    #[doc = ""]
33419    #[doc = "ID: 270"]
33420    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
33421    #[doc = "Local position/attitude estimate from a vision source."]
33422    #[doc = ""]
33423    #[doc = "ID: 102"]
33424    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
33425    #[doc = "Speed estimate from a vision source."]
33426    #[doc = ""]
33427    #[doc = "ID: 103"]
33428    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
33429    #[doc = "Cumulative distance traveled for each reported wheel."]
33430    #[doc = ""]
33431    #[doc = "ID: 9000"]
33432    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
33433    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33434    #[doc = ""]
33435    #[doc = "ID: 299"]
33436    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
33437    #[doc = "Winch status."]
33438    #[doc = ""]
33439    #[doc = "ID: 9005"]
33440    WINCH_STATUS(WINCH_STATUS_DATA),
33441    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33442    #[doc = ""]
33443    #[doc = "ID: 231"]
33444    WIND_COV(WIND_COV_DATA),
33445}
33446impl MavMessage {
33447    pub const fn all_ids() -> &'static [u32] {
33448        &[
33449            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
33450            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
33451            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
33452            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
33453            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
33454            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
33455            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
33456            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
33457            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
33458            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
33459            148u32, 149u32, 162u32, 180u32, 181u32, 182u32, 183u32, 184u32, 192u32, 225u32, 230u32,
33460            231u32, 232u32, 233u32, 234u32, 235u32, 241u32, 242u32, 243u32, 244u32, 245u32, 246u32,
33461            247u32, 248u32, 249u32, 250u32, 251u32, 252u32, 253u32, 254u32, 256u32, 257u32, 258u32,
33462            259u32, 260u32, 261u32, 262u32, 263u32, 264u32, 265u32, 266u32, 267u32, 268u32, 269u32,
33463            270u32, 271u32, 275u32, 276u32, 277u32, 280u32, 281u32, 282u32, 283u32, 284u32, 285u32,
33464            286u32, 287u32, 288u32, 290u32, 291u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32,
33465            321u32, 322u32, 323u32, 324u32, 330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32,
33466            339u32, 340u32, 350u32, 360u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32,
33467            386u32, 387u32, 388u32, 390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32,
33468            412u32, 413u32, 435u32, 436u32, 437u32, 440u32, 9000u32, 9005u32, 12900u32, 12901u32,
33469            12902u32, 12903u32, 12904u32, 12905u32, 12915u32, 12918u32, 12919u32, 12920u32,
33470        ]
33471    }
33472    pub const fn all_messages() -> &'static [(&'static str, u32)] {
33473        &[
33474            (HEARTBEAT_DATA::NAME, HEARTBEAT_DATA::ID),
33475            (SYS_STATUS_DATA::NAME, SYS_STATUS_DATA::ID),
33476            (SYSTEM_TIME_DATA::NAME, SYSTEM_TIME_DATA::ID),
33477            (PING_DATA::NAME, PING_DATA::ID),
33478            (
33479                CHANGE_OPERATOR_CONTROL_DATA::NAME,
33480                CHANGE_OPERATOR_CONTROL_DATA::ID,
33481            ),
33482            (
33483                CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
33484                CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
33485            ),
33486            (AUTH_KEY_DATA::NAME, AUTH_KEY_DATA::ID),
33487            (LINK_NODE_STATUS_DATA::NAME, LINK_NODE_STATUS_DATA::ID),
33488            (SET_MODE_DATA::NAME, SET_MODE_DATA::ID),
33489            (PARAM_REQUEST_READ_DATA::NAME, PARAM_REQUEST_READ_DATA::ID),
33490            (PARAM_REQUEST_LIST_DATA::NAME, PARAM_REQUEST_LIST_DATA::ID),
33491            (PARAM_VALUE_DATA::NAME, PARAM_VALUE_DATA::ID),
33492            (PARAM_SET_DATA::NAME, PARAM_SET_DATA::ID),
33493            (GPS_RAW_INT_DATA::NAME, GPS_RAW_INT_DATA::ID),
33494            (GPS_STATUS_DATA::NAME, GPS_STATUS_DATA::ID),
33495            (SCALED_IMU_DATA::NAME, SCALED_IMU_DATA::ID),
33496            (RAW_IMU_DATA::NAME, RAW_IMU_DATA::ID),
33497            (RAW_PRESSURE_DATA::NAME, RAW_PRESSURE_DATA::ID),
33498            (SCALED_PRESSURE_DATA::NAME, SCALED_PRESSURE_DATA::ID),
33499            (ATTITUDE_DATA::NAME, ATTITUDE_DATA::ID),
33500            (ATTITUDE_QUATERNION_DATA::NAME, ATTITUDE_QUATERNION_DATA::ID),
33501            (LOCAL_POSITION_NED_DATA::NAME, LOCAL_POSITION_NED_DATA::ID),
33502            (GLOBAL_POSITION_INT_DATA::NAME, GLOBAL_POSITION_INT_DATA::ID),
33503            (RC_CHANNELS_SCALED_DATA::NAME, RC_CHANNELS_SCALED_DATA::ID),
33504            (RC_CHANNELS_RAW_DATA::NAME, RC_CHANNELS_RAW_DATA::ID),
33505            (SERVO_OUTPUT_RAW_DATA::NAME, SERVO_OUTPUT_RAW_DATA::ID),
33506            (
33507                MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
33508                MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
33509            ),
33510            (
33511                MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
33512                MISSION_WRITE_PARTIAL_LIST_DATA::ID,
33513            ),
33514            (MISSION_ITEM_DATA::NAME, MISSION_ITEM_DATA::ID),
33515            (MISSION_REQUEST_DATA::NAME, MISSION_REQUEST_DATA::ID),
33516            (MISSION_SET_CURRENT_DATA::NAME, MISSION_SET_CURRENT_DATA::ID),
33517            (MISSION_CURRENT_DATA::NAME, MISSION_CURRENT_DATA::ID),
33518            (
33519                MISSION_REQUEST_LIST_DATA::NAME,
33520                MISSION_REQUEST_LIST_DATA::ID,
33521            ),
33522            (MISSION_COUNT_DATA::NAME, MISSION_COUNT_DATA::ID),
33523            (MISSION_CLEAR_ALL_DATA::NAME, MISSION_CLEAR_ALL_DATA::ID),
33524            (
33525                MISSION_ITEM_REACHED_DATA::NAME,
33526                MISSION_ITEM_REACHED_DATA::ID,
33527            ),
33528            (MISSION_ACK_DATA::NAME, MISSION_ACK_DATA::ID),
33529            (
33530                SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
33531                SET_GPS_GLOBAL_ORIGIN_DATA::ID,
33532            ),
33533            (GPS_GLOBAL_ORIGIN_DATA::NAME, GPS_GLOBAL_ORIGIN_DATA::ID),
33534            (PARAM_MAP_RC_DATA::NAME, PARAM_MAP_RC_DATA::ID),
33535            (MISSION_REQUEST_INT_DATA::NAME, MISSION_REQUEST_INT_DATA::ID),
33536            (
33537                SAFETY_SET_ALLOWED_AREA_DATA::NAME,
33538                SAFETY_SET_ALLOWED_AREA_DATA::ID,
33539            ),
33540            (SAFETY_ALLOWED_AREA_DATA::NAME, SAFETY_ALLOWED_AREA_DATA::ID),
33541            (
33542                ATTITUDE_QUATERNION_COV_DATA::NAME,
33543                ATTITUDE_QUATERNION_COV_DATA::ID,
33544            ),
33545            (
33546                NAV_CONTROLLER_OUTPUT_DATA::NAME,
33547                NAV_CONTROLLER_OUTPUT_DATA::ID,
33548            ),
33549            (
33550                GLOBAL_POSITION_INT_COV_DATA::NAME,
33551                GLOBAL_POSITION_INT_COV_DATA::ID,
33552            ),
33553            (
33554                LOCAL_POSITION_NED_COV_DATA::NAME,
33555                LOCAL_POSITION_NED_COV_DATA::ID,
33556            ),
33557            (RC_CHANNELS_DATA::NAME, RC_CHANNELS_DATA::ID),
33558            (REQUEST_DATA_STREAM_DATA::NAME, REQUEST_DATA_STREAM_DATA::ID),
33559            (DATA_STREAM_DATA::NAME, DATA_STREAM_DATA::ID),
33560            (MANUAL_CONTROL_DATA::NAME, MANUAL_CONTROL_DATA::ID),
33561            (
33562                RC_CHANNELS_OVERRIDE_DATA::NAME,
33563                RC_CHANNELS_OVERRIDE_DATA::ID,
33564            ),
33565            (MISSION_ITEM_INT_DATA::NAME, MISSION_ITEM_INT_DATA::ID),
33566            (VFR_HUD_DATA::NAME, VFR_HUD_DATA::ID),
33567            (COMMAND_INT_DATA::NAME, COMMAND_INT_DATA::ID),
33568            (COMMAND_LONG_DATA::NAME, COMMAND_LONG_DATA::ID),
33569            (COMMAND_ACK_DATA::NAME, COMMAND_ACK_DATA::ID),
33570            (COMMAND_CANCEL_DATA::NAME, COMMAND_CANCEL_DATA::ID),
33571            (MANUAL_SETPOINT_DATA::NAME, MANUAL_SETPOINT_DATA::ID),
33572            (SET_ATTITUDE_TARGET_DATA::NAME, SET_ATTITUDE_TARGET_DATA::ID),
33573            (ATTITUDE_TARGET_DATA::NAME, ATTITUDE_TARGET_DATA::ID),
33574            (
33575                SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
33576                SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
33577            ),
33578            (
33579                POSITION_TARGET_LOCAL_NED_DATA::NAME,
33580                POSITION_TARGET_LOCAL_NED_DATA::ID,
33581            ),
33582            (
33583                SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
33584                SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
33585            ),
33586            (
33587                POSITION_TARGET_GLOBAL_INT_DATA::NAME,
33588                POSITION_TARGET_GLOBAL_INT_DATA::ID,
33589            ),
33590            (
33591                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME,
33592                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID,
33593            ),
33594            (HIL_STATE_DATA::NAME, HIL_STATE_DATA::ID),
33595            (HIL_CONTROLS_DATA::NAME, HIL_CONTROLS_DATA::ID),
33596            (HIL_RC_INPUTS_RAW_DATA::NAME, HIL_RC_INPUTS_RAW_DATA::ID),
33597            (
33598                HIL_ACTUATOR_CONTROLS_DATA::NAME,
33599                HIL_ACTUATOR_CONTROLS_DATA::ID,
33600            ),
33601            (OPTICAL_FLOW_DATA::NAME, OPTICAL_FLOW_DATA::ID),
33602            (
33603                GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
33604                GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
33605            ),
33606            (
33607                VISION_POSITION_ESTIMATE_DATA::NAME,
33608                VISION_POSITION_ESTIMATE_DATA::ID,
33609            ),
33610            (
33611                VISION_SPEED_ESTIMATE_DATA::NAME,
33612                VISION_SPEED_ESTIMATE_DATA::ID,
33613            ),
33614            (
33615                VICON_POSITION_ESTIMATE_DATA::NAME,
33616                VICON_POSITION_ESTIMATE_DATA::ID,
33617            ),
33618            (HIGHRES_IMU_DATA::NAME, HIGHRES_IMU_DATA::ID),
33619            (OPTICAL_FLOW_RAD_DATA::NAME, OPTICAL_FLOW_RAD_DATA::ID),
33620            (HIL_SENSOR_DATA::NAME, HIL_SENSOR_DATA::ID),
33621            (SIM_STATE_DATA::NAME, SIM_STATE_DATA::ID),
33622            (RADIO_STATUS_DATA::NAME, RADIO_STATUS_DATA::ID),
33623            (
33624                FILE_TRANSFER_PROTOCOL_DATA::NAME,
33625                FILE_TRANSFER_PROTOCOL_DATA::ID,
33626            ),
33627            (TIMESYNC_DATA::NAME, TIMESYNC_DATA::ID),
33628            (CAMERA_TRIGGER_DATA::NAME, CAMERA_TRIGGER_DATA::ID),
33629            (HIL_GPS_DATA::NAME, HIL_GPS_DATA::ID),
33630            (HIL_OPTICAL_FLOW_DATA::NAME, HIL_OPTICAL_FLOW_DATA::ID),
33631            (
33632                HIL_STATE_QUATERNION_DATA::NAME,
33633                HIL_STATE_QUATERNION_DATA::ID,
33634            ),
33635            (SCALED_IMU2_DATA::NAME, SCALED_IMU2_DATA::ID),
33636            (LOG_REQUEST_LIST_DATA::NAME, LOG_REQUEST_LIST_DATA::ID),
33637            (LOG_ENTRY_DATA::NAME, LOG_ENTRY_DATA::ID),
33638            (LOG_REQUEST_DATA_DATA::NAME, LOG_REQUEST_DATA_DATA::ID),
33639            (LOG_DATA_DATA::NAME, LOG_DATA_DATA::ID),
33640            (LOG_ERASE_DATA::NAME, LOG_ERASE_DATA::ID),
33641            (LOG_REQUEST_END_DATA::NAME, LOG_REQUEST_END_DATA::ID),
33642            (GPS_INJECT_DATA_DATA::NAME, GPS_INJECT_DATA_DATA::ID),
33643            (GPS2_RAW_DATA::NAME, GPS2_RAW_DATA::ID),
33644            (POWER_STATUS_DATA::NAME, POWER_STATUS_DATA::ID),
33645            (SERIAL_CONTROL_DATA::NAME, SERIAL_CONTROL_DATA::ID),
33646            (GPS_RTK_DATA::NAME, GPS_RTK_DATA::ID),
33647            (GPS2_RTK_DATA::NAME, GPS2_RTK_DATA::ID),
33648            (SCALED_IMU3_DATA::NAME, SCALED_IMU3_DATA::ID),
33649            (
33650                DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
33651                DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
33652            ),
33653            (ENCAPSULATED_DATA_DATA::NAME, ENCAPSULATED_DATA_DATA::ID),
33654            (DISTANCE_SENSOR_DATA::NAME, DISTANCE_SENSOR_DATA::ID),
33655            (TERRAIN_REQUEST_DATA::NAME, TERRAIN_REQUEST_DATA::ID),
33656            (TERRAIN_DATA_DATA::NAME, TERRAIN_DATA_DATA::ID),
33657            (TERRAIN_CHECK_DATA::NAME, TERRAIN_CHECK_DATA::ID),
33658            (TERRAIN_REPORT_DATA::NAME, TERRAIN_REPORT_DATA::ID),
33659            (SCALED_PRESSURE2_DATA::NAME, SCALED_PRESSURE2_DATA::ID),
33660            (ATT_POS_MOCAP_DATA::NAME, ATT_POS_MOCAP_DATA::ID),
33661            (
33662                SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
33663                SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
33664            ),
33665            (
33666                ACTUATOR_CONTROL_TARGET_DATA::NAME,
33667                ACTUATOR_CONTROL_TARGET_DATA::ID,
33668            ),
33669            (ALTITUDE_DATA::NAME, ALTITUDE_DATA::ID),
33670            (RESOURCE_REQUEST_DATA::NAME, RESOURCE_REQUEST_DATA::ID),
33671            (SCALED_PRESSURE3_DATA::NAME, SCALED_PRESSURE3_DATA::ID),
33672            (FOLLOW_TARGET_DATA::NAME, FOLLOW_TARGET_DATA::ID),
33673            (
33674                CONTROL_SYSTEM_STATE_DATA::NAME,
33675                CONTROL_SYSTEM_STATE_DATA::ID,
33676            ),
33677            (BATTERY_STATUS_DATA::NAME, BATTERY_STATUS_DATA::ID),
33678            (AUTOPILOT_VERSION_DATA::NAME, AUTOPILOT_VERSION_DATA::ID),
33679            (LANDING_TARGET_DATA::NAME, LANDING_TARGET_DATA::ID),
33680            (FENCE_STATUS_DATA::NAME, FENCE_STATUS_DATA::ID),
33681            (SCRIPT_ITEM_DATA::NAME, SCRIPT_ITEM_DATA::ID),
33682            (SCRIPT_REQUEST_DATA::NAME, SCRIPT_REQUEST_DATA::ID),
33683            (SCRIPT_REQUEST_LIST_DATA::NAME, SCRIPT_REQUEST_LIST_DATA::ID),
33684            (SCRIPT_COUNT_DATA::NAME, SCRIPT_COUNT_DATA::ID),
33685            (SCRIPT_CURRENT_DATA::NAME, SCRIPT_CURRENT_DATA::ID),
33686            (MAG_CAL_REPORT_DATA::NAME, MAG_CAL_REPORT_DATA::ID),
33687            (EFI_STATUS_DATA::NAME, EFI_STATUS_DATA::ID),
33688            (ESTIMATOR_STATUS_DATA::NAME, ESTIMATOR_STATUS_DATA::ID),
33689            (WIND_COV_DATA::NAME, WIND_COV_DATA::ID),
33690            (GPS_INPUT_DATA::NAME, GPS_INPUT_DATA::ID),
33691            (GPS_RTCM_DATA_DATA::NAME, GPS_RTCM_DATA_DATA::ID),
33692            (HIGH_LATENCY_DATA::NAME, HIGH_LATENCY_DATA::ID),
33693            (HIGH_LATENCY2_DATA::NAME, HIGH_LATENCY2_DATA::ID),
33694            (VIBRATION_DATA::NAME, VIBRATION_DATA::ID),
33695            (HOME_POSITION_DATA::NAME, HOME_POSITION_DATA::ID),
33696            (SET_HOME_POSITION_DATA::NAME, SET_HOME_POSITION_DATA::ID),
33697            (MESSAGE_INTERVAL_DATA::NAME, MESSAGE_INTERVAL_DATA::ID),
33698            (EXTENDED_SYS_STATE_DATA::NAME, EXTENDED_SYS_STATE_DATA::ID),
33699            (ADSB_VEHICLE_DATA::NAME, ADSB_VEHICLE_DATA::ID),
33700            (COLLISION_DATA::NAME, COLLISION_DATA::ID),
33701            (V2_EXTENSION_DATA::NAME, V2_EXTENSION_DATA::ID),
33702            (MEMORY_VECT_DATA::NAME, MEMORY_VECT_DATA::ID),
33703            (DEBUG_VECT_DATA::NAME, DEBUG_VECT_DATA::ID),
33704            (NAMED_VALUE_FLOAT_DATA::NAME, NAMED_VALUE_FLOAT_DATA::ID),
33705            (NAMED_VALUE_INT_DATA::NAME, NAMED_VALUE_INT_DATA::ID),
33706            (STATUSTEXT_DATA::NAME, STATUSTEXT_DATA::ID),
33707            (DEBUG_DATA::NAME, DEBUG_DATA::ID),
33708            (SETUP_SIGNING_DATA::NAME, SETUP_SIGNING_DATA::ID),
33709            (BUTTON_CHANGE_DATA::NAME, BUTTON_CHANGE_DATA::ID),
33710            (PLAY_TUNE_DATA::NAME, PLAY_TUNE_DATA::ID),
33711            (CAMERA_INFORMATION_DATA::NAME, CAMERA_INFORMATION_DATA::ID),
33712            (CAMERA_SETTINGS_DATA::NAME, CAMERA_SETTINGS_DATA::ID),
33713            (STORAGE_INFORMATION_DATA::NAME, STORAGE_INFORMATION_DATA::ID),
33714            (
33715                CAMERA_CAPTURE_STATUS_DATA::NAME,
33716                CAMERA_CAPTURE_STATUS_DATA::ID,
33717            ),
33718            (
33719                CAMERA_IMAGE_CAPTURED_DATA::NAME,
33720                CAMERA_IMAGE_CAPTURED_DATA::ID,
33721            ),
33722            (FLIGHT_INFORMATION_DATA::NAME, FLIGHT_INFORMATION_DATA::ID),
33723            (MOUNT_ORIENTATION_DATA::NAME, MOUNT_ORIENTATION_DATA::ID),
33724            (LOGGING_DATA_DATA::NAME, LOGGING_DATA_DATA::ID),
33725            (LOGGING_DATA_ACKED_DATA::NAME, LOGGING_DATA_ACKED_DATA::ID),
33726            (LOGGING_ACK_DATA::NAME, LOGGING_ACK_DATA::ID),
33727            (
33728                VIDEO_STREAM_INFORMATION_DATA::NAME,
33729                VIDEO_STREAM_INFORMATION_DATA::ID,
33730            ),
33731            (VIDEO_STREAM_STATUS_DATA::NAME, VIDEO_STREAM_STATUS_DATA::ID),
33732            (CAMERA_FOV_STATUS_DATA::NAME, CAMERA_FOV_STATUS_DATA::ID),
33733            (
33734                CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
33735                CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
33736            ),
33737            (
33738                CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
33739                CAMERA_TRACKING_GEO_STATUS_DATA::ID,
33740            ),
33741            (
33742                CAMERA_THERMAL_RANGE_DATA::NAME,
33743                CAMERA_THERMAL_RANGE_DATA::ID,
33744            ),
33745            (
33746                GIMBAL_MANAGER_INFORMATION_DATA::NAME,
33747                GIMBAL_MANAGER_INFORMATION_DATA::ID,
33748            ),
33749            (
33750                GIMBAL_MANAGER_STATUS_DATA::NAME,
33751                GIMBAL_MANAGER_STATUS_DATA::ID,
33752            ),
33753            (
33754                GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
33755                GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
33756            ),
33757            (
33758                GIMBAL_DEVICE_INFORMATION_DATA::NAME,
33759                GIMBAL_DEVICE_INFORMATION_DATA::ID,
33760            ),
33761            (
33762                GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
33763                GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
33764            ),
33765            (
33766                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
33767                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
33768            ),
33769            (
33770                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME,
33771                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID,
33772            ),
33773            (
33774                GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
33775                GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
33776            ),
33777            (
33778                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME,
33779                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID,
33780            ),
33781            (ESC_INFO_DATA::NAME, ESC_INFO_DATA::ID),
33782            (ESC_STATUS_DATA::NAME, ESC_STATUS_DATA::ID),
33783            (WIFI_CONFIG_AP_DATA::NAME, WIFI_CONFIG_AP_DATA::ID),
33784            (PROTOCOL_VERSION_DATA::NAME, PROTOCOL_VERSION_DATA::ID),
33785            (AIS_VESSEL_DATA::NAME, AIS_VESSEL_DATA::ID),
33786            (UAVCAN_NODE_STATUS_DATA::NAME, UAVCAN_NODE_STATUS_DATA::ID),
33787            (UAVCAN_NODE_INFO_DATA::NAME, UAVCAN_NODE_INFO_DATA::ID),
33788            (
33789                PARAM_EXT_REQUEST_READ_DATA::NAME,
33790                PARAM_EXT_REQUEST_READ_DATA::ID,
33791            ),
33792            (
33793                PARAM_EXT_REQUEST_LIST_DATA::NAME,
33794                PARAM_EXT_REQUEST_LIST_DATA::ID,
33795            ),
33796            (PARAM_EXT_VALUE_DATA::NAME, PARAM_EXT_VALUE_DATA::ID),
33797            (PARAM_EXT_SET_DATA::NAME, PARAM_EXT_SET_DATA::ID),
33798            (PARAM_EXT_ACK_DATA::NAME, PARAM_EXT_ACK_DATA::ID),
33799            (OBSTACLE_DISTANCE_DATA::NAME, OBSTACLE_DISTANCE_DATA::ID),
33800            (ODOMETRY_DATA::NAME, ODOMETRY_DATA::ID),
33801            (
33802                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME,
33803                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID,
33804            ),
33805            (
33806                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME,
33807                TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
33808            ),
33809            (CELLULAR_STATUS_DATA::NAME, CELLULAR_STATUS_DATA::ID),
33810            (ISBD_LINK_STATUS_DATA::NAME, ISBD_LINK_STATUS_DATA::ID),
33811            (CELLULAR_CONFIG_DATA::NAME, CELLULAR_CONFIG_DATA::ID),
33812            (RAW_RPM_DATA::NAME, RAW_RPM_DATA::ID),
33813            (UTM_GLOBAL_POSITION_DATA::NAME, UTM_GLOBAL_POSITION_DATA::ID),
33814            (DEBUG_FLOAT_ARRAY_DATA::NAME, DEBUG_FLOAT_ARRAY_DATA::ID),
33815            (
33816                ORBIT_EXECUTION_STATUS_DATA::NAME,
33817                ORBIT_EXECUTION_STATUS_DATA::ID,
33818            ),
33819            (SMART_BATTERY_INFO_DATA::NAME, SMART_BATTERY_INFO_DATA::ID),
33820            (FUEL_STATUS_DATA::NAME, FUEL_STATUS_DATA::ID),
33821            (BATTERY_INFO_DATA::NAME, BATTERY_INFO_DATA::ID),
33822            (GENERATOR_STATUS_DATA::NAME, GENERATOR_STATUS_DATA::ID),
33823            (
33824                ACTUATOR_OUTPUT_STATUS_DATA::NAME,
33825                ACTUATOR_OUTPUT_STATUS_DATA::ID,
33826            ),
33827            (
33828                TIME_ESTIMATE_TO_TARGET_DATA::NAME,
33829                TIME_ESTIMATE_TO_TARGET_DATA::ID,
33830            ),
33831            (TUNNEL_DATA::NAME, TUNNEL_DATA::ID),
33832            (CAN_FRAME_DATA::NAME, CAN_FRAME_DATA::ID),
33833            (CANFD_FRAME_DATA::NAME, CANFD_FRAME_DATA::ID),
33834            (CAN_FILTER_MODIFY_DATA::NAME, CAN_FILTER_MODIFY_DATA::ID),
33835            (
33836                ONBOARD_COMPUTER_STATUS_DATA::NAME,
33837                ONBOARD_COMPUTER_STATUS_DATA::ID,
33838            ),
33839            (
33840                COMPONENT_INFORMATION_DATA::NAME,
33841                COMPONENT_INFORMATION_DATA::ID,
33842            ),
33843            (
33844                COMPONENT_INFORMATION_BASIC_DATA::NAME,
33845                COMPONENT_INFORMATION_BASIC_DATA::ID,
33846            ),
33847            (COMPONENT_METADATA_DATA::NAME, COMPONENT_METADATA_DATA::ID),
33848            (PLAY_TUNE_V2_DATA::NAME, PLAY_TUNE_V2_DATA::ID),
33849            (SUPPORTED_TUNES_DATA::NAME, SUPPORTED_TUNES_DATA::ID),
33850            (EVENT_DATA::NAME, EVENT_DATA::ID),
33851            (
33852                CURRENT_EVENT_SEQUENCE_DATA::NAME,
33853                CURRENT_EVENT_SEQUENCE_DATA::ID,
33854            ),
33855            (REQUEST_EVENT_DATA::NAME, REQUEST_EVENT_DATA::ID),
33856            (
33857                RESPONSE_EVENT_ERROR_DATA::NAME,
33858                RESPONSE_EVENT_ERROR_DATA::ID,
33859            ),
33860            (AVAILABLE_MODES_DATA::NAME, AVAILABLE_MODES_DATA::ID),
33861            (CURRENT_MODE_DATA::NAME, CURRENT_MODE_DATA::ID),
33862            (
33863                AVAILABLE_MODES_MONITOR_DATA::NAME,
33864                AVAILABLE_MODES_MONITOR_DATA::ID,
33865            ),
33866            (ILLUMINATOR_STATUS_DATA::NAME, ILLUMINATOR_STATUS_DATA::ID),
33867            (WHEEL_DISTANCE_DATA::NAME, WHEEL_DISTANCE_DATA::ID),
33868            (WINCH_STATUS_DATA::NAME, WINCH_STATUS_DATA::ID),
33869            (
33870                OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
33871                OPEN_DRONE_ID_BASIC_ID_DATA::ID,
33872            ),
33873            (
33874                OPEN_DRONE_ID_LOCATION_DATA::NAME,
33875                OPEN_DRONE_ID_LOCATION_DATA::ID,
33876            ),
33877            (
33878                OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
33879                OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
33880            ),
33881            (
33882                OPEN_DRONE_ID_SELF_ID_DATA::NAME,
33883                OPEN_DRONE_ID_SELF_ID_DATA::ID,
33884            ),
33885            (
33886                OPEN_DRONE_ID_SYSTEM_DATA::NAME,
33887                OPEN_DRONE_ID_SYSTEM_DATA::ID,
33888            ),
33889            (
33890                OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
33891                OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
33892            ),
33893            (
33894                OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
33895                OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
33896            ),
33897            (
33898                OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
33899                OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
33900            ),
33901            (
33902                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
33903                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
33904            ),
33905            (HYGROMETER_SENSOR_DATA::NAME, HYGROMETER_SENSOR_DATA::ID),
33906        ]
33907    }
33908}
33909impl Message for MavMessage {
33910    fn parse(
33911        version: MavlinkVersion,
33912        id: u32,
33913        payload: &[u8],
33914    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33915        match id {
33916            ACTUATOR_CONTROL_TARGET_DATA::ID => {
33917                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
33918                    .map(Self::ACTUATOR_CONTROL_TARGET)
33919            }
33920            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
33921                .map(Self::ACTUATOR_OUTPUT_STATUS),
33922            ADSB_VEHICLE_DATA::ID => {
33923                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
33924            }
33925            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
33926            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
33927            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
33928            ATTITUDE_QUATERNION_DATA::ID => {
33929                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
33930            }
33931            ATTITUDE_QUATERNION_COV_DATA::ID => {
33932                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
33933                    .map(Self::ATTITUDE_QUATERNION_COV)
33934            }
33935            ATTITUDE_TARGET_DATA::ID => {
33936                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
33937            }
33938            ATT_POS_MOCAP_DATA::ID => {
33939                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
33940            }
33941            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
33942            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33943                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
33944                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
33945            }
33946            AUTOPILOT_VERSION_DATA::ID => {
33947                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
33948            }
33949            AVAILABLE_MODES_DATA::ID => {
33950                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
33951            }
33952            AVAILABLE_MODES_MONITOR_DATA::ID => {
33953                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
33954                    .map(Self::AVAILABLE_MODES_MONITOR)
33955            }
33956            BATTERY_INFO_DATA::ID => {
33957                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
33958            }
33959            BATTERY_STATUS_DATA::ID => {
33960                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
33961            }
33962            BUTTON_CHANGE_DATA::ID => {
33963                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
33964            }
33965            CAMERA_CAPTURE_STATUS_DATA::ID => {
33966                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
33967            }
33968            CAMERA_FOV_STATUS_DATA::ID => {
33969                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
33970            }
33971            CAMERA_IMAGE_CAPTURED_DATA::ID => {
33972                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
33973            }
33974            CAMERA_INFORMATION_DATA::ID => {
33975                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
33976            }
33977            CAMERA_SETTINGS_DATA::ID => {
33978                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
33979            }
33980            CAMERA_THERMAL_RANGE_DATA::ID => {
33981                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
33982            }
33983            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
33984                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
33985                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
33986            }
33987            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
33988                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
33989                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
33990            }
33991            CAMERA_TRIGGER_DATA::ID => {
33992                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
33993            }
33994            CANFD_FRAME_DATA::ID => {
33995                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
33996            }
33997            CAN_FILTER_MODIFY_DATA::ID => {
33998                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
33999            }
34000            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
34001            CELLULAR_CONFIG_DATA::ID => {
34002                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
34003            }
34004            CELLULAR_STATUS_DATA::ID => {
34005                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
34006            }
34007            CHANGE_OPERATOR_CONTROL_DATA::ID => {
34008                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
34009                    .map(Self::CHANGE_OPERATOR_CONTROL)
34010            }
34011            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
34012                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
34013                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
34014            }
34015            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
34016            COMMAND_ACK_DATA::ID => {
34017                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
34018            }
34019            COMMAND_CANCEL_DATA::ID => {
34020                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
34021            }
34022            COMMAND_INT_DATA::ID => {
34023                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
34024            }
34025            COMMAND_LONG_DATA::ID => {
34026                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
34027            }
34028            COMPONENT_INFORMATION_DATA::ID => {
34029                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
34030            }
34031            COMPONENT_INFORMATION_BASIC_DATA::ID => {
34032                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
34033                    .map(Self::COMPONENT_INFORMATION_BASIC)
34034            }
34035            COMPONENT_METADATA_DATA::ID => {
34036                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
34037            }
34038            CONTROL_SYSTEM_STATE_DATA::ID => {
34039                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
34040            }
34041            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
34042                .map(Self::CURRENT_EVENT_SEQUENCE),
34043            CURRENT_MODE_DATA::ID => {
34044                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
34045            }
34046            DATA_STREAM_DATA::ID => {
34047                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
34048            }
34049            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
34050                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
34051                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
34052            }
34053            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
34054            DEBUG_FLOAT_ARRAY_DATA::ID => {
34055                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
34056            }
34057            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
34058            DISTANCE_SENSOR_DATA::ID => {
34059                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
34060            }
34061            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
34062            ENCAPSULATED_DATA_DATA::ID => {
34063                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
34064            }
34065            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
34066            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
34067            ESTIMATOR_STATUS_DATA::ID => {
34068                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
34069            }
34070            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
34071            EXTENDED_SYS_STATE_DATA::ID => {
34072                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
34073            }
34074            FENCE_STATUS_DATA::ID => {
34075                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
34076            }
34077            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
34078                .map(Self::FILE_TRANSFER_PROTOCOL),
34079            FLIGHT_INFORMATION_DATA::ID => {
34080                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
34081            }
34082            FOLLOW_TARGET_DATA::ID => {
34083                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
34084            }
34085            FUEL_STATUS_DATA::ID => {
34086                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
34087            }
34088            GENERATOR_STATUS_DATA::ID => {
34089                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
34090            }
34091            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
34092                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
34093                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
34094            }
34095            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
34096                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
34097                    .map(Self::GIMBAL_DEVICE_INFORMATION)
34098            }
34099            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
34100                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
34101                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
34102            }
34103            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
34104                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
34105                    .map(Self::GIMBAL_MANAGER_INFORMATION)
34106            }
34107            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
34108                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
34109                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
34110            }
34111            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
34112                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
34113                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
34114            }
34115            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
34116                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
34117                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
34118            }
34119            GIMBAL_MANAGER_STATUS_DATA::ID => {
34120                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
34121            }
34122            GLOBAL_POSITION_INT_DATA::ID => {
34123                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
34124            }
34125            GLOBAL_POSITION_INT_COV_DATA::ID => {
34126                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
34127                    .map(Self::GLOBAL_POSITION_INT_COV)
34128            }
34129            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
34130                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34131                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
34132            }
34133            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
34134            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
34135            GPS_GLOBAL_ORIGIN_DATA::ID => {
34136                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
34137            }
34138            GPS_INJECT_DATA_DATA::ID => {
34139                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
34140            }
34141            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
34142            GPS_RAW_INT_DATA::ID => {
34143                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
34144            }
34145            GPS_RTCM_DATA_DATA::ID => {
34146                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
34147            }
34148            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
34149            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
34150            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
34151            HIGHRES_IMU_DATA::ID => {
34152                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
34153            }
34154            HIGH_LATENCY_DATA::ID => {
34155                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
34156            }
34157            HIGH_LATENCY2_DATA::ID => {
34158                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
34159            }
34160            HIL_ACTUATOR_CONTROLS_DATA::ID => {
34161                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
34162            }
34163            HIL_CONTROLS_DATA::ID => {
34164                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
34165            }
34166            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
34167            HIL_OPTICAL_FLOW_DATA::ID => {
34168                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
34169            }
34170            HIL_RC_INPUTS_RAW_DATA::ID => {
34171                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
34172            }
34173            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
34174            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
34175            HIL_STATE_QUATERNION_DATA::ID => {
34176                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
34177            }
34178            HOME_POSITION_DATA::ID => {
34179                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
34180            }
34181            HYGROMETER_SENSOR_DATA::ID => {
34182                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
34183            }
34184            ILLUMINATOR_STATUS_DATA::ID => {
34185                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
34186            }
34187            ISBD_LINK_STATUS_DATA::ID => {
34188                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
34189            }
34190            LANDING_TARGET_DATA::ID => {
34191                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
34192            }
34193            LINK_NODE_STATUS_DATA::ID => {
34194                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
34195            }
34196            LOCAL_POSITION_NED_DATA::ID => {
34197                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
34198            }
34199            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
34200                .map(Self::LOCAL_POSITION_NED_COV),
34201            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
34202                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
34203                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
34204            }
34205            LOGGING_ACK_DATA::ID => {
34206                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
34207            }
34208            LOGGING_DATA_DATA::ID => {
34209                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
34210            }
34211            LOGGING_DATA_ACKED_DATA::ID => {
34212                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
34213            }
34214            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
34215            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
34216            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
34217            LOG_REQUEST_DATA_DATA::ID => {
34218                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
34219            }
34220            LOG_REQUEST_END_DATA::ID => {
34221                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
34222            }
34223            LOG_REQUEST_LIST_DATA::ID => {
34224                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
34225            }
34226            MAG_CAL_REPORT_DATA::ID => {
34227                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
34228            }
34229            MANUAL_CONTROL_DATA::ID => {
34230                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
34231            }
34232            MANUAL_SETPOINT_DATA::ID => {
34233                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
34234            }
34235            MEMORY_VECT_DATA::ID => {
34236                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
34237            }
34238            MESSAGE_INTERVAL_DATA::ID => {
34239                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
34240            }
34241            MISSION_ACK_DATA::ID => {
34242                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
34243            }
34244            MISSION_CLEAR_ALL_DATA::ID => {
34245                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
34246            }
34247            MISSION_COUNT_DATA::ID => {
34248                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
34249            }
34250            MISSION_CURRENT_DATA::ID => {
34251                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
34252            }
34253            MISSION_ITEM_DATA::ID => {
34254                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
34255            }
34256            MISSION_ITEM_INT_DATA::ID => {
34257                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
34258            }
34259            MISSION_ITEM_REACHED_DATA::ID => {
34260                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
34261            }
34262            MISSION_REQUEST_DATA::ID => {
34263                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
34264            }
34265            MISSION_REQUEST_INT_DATA::ID => {
34266                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
34267            }
34268            MISSION_REQUEST_LIST_DATA::ID => {
34269                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
34270            }
34271            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
34272                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
34273                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
34274            }
34275            MISSION_SET_CURRENT_DATA::ID => {
34276                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
34277            }
34278            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
34279                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
34280                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
34281            }
34282            MOUNT_ORIENTATION_DATA::ID => {
34283                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
34284            }
34285            NAMED_VALUE_FLOAT_DATA::ID => {
34286                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
34287            }
34288            NAMED_VALUE_INT_DATA::ID => {
34289                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
34290            }
34291            NAV_CONTROLLER_OUTPUT_DATA::ID => {
34292                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
34293            }
34294            OBSTACLE_DISTANCE_DATA::ID => {
34295                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
34296            }
34297            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
34298            ONBOARD_COMPUTER_STATUS_DATA::ID => {
34299                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
34300                    .map(Self::ONBOARD_COMPUTER_STATUS)
34301            }
34302            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
34303                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
34304                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
34305            }
34306            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
34307                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
34308                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
34309            }
34310            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
34311                .map(Self::OPEN_DRONE_ID_BASIC_ID),
34312            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
34313                .map(Self::OPEN_DRONE_ID_LOCATION),
34314            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
34315                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
34316                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
34317            }
34318            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
34319                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
34320                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
34321            }
34322            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
34323                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
34324            }
34325            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
34326                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
34327            }
34328            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
34329                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
34330                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
34331            }
34332            OPTICAL_FLOW_DATA::ID => {
34333                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
34334            }
34335            OPTICAL_FLOW_RAD_DATA::ID => {
34336                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
34337            }
34338            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
34339                .map(Self::ORBIT_EXECUTION_STATUS),
34340            PARAM_EXT_ACK_DATA::ID => {
34341                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
34342            }
34343            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
34344                .map(Self::PARAM_EXT_REQUEST_LIST),
34345            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
34346                .map(Self::PARAM_EXT_REQUEST_READ),
34347            PARAM_EXT_SET_DATA::ID => {
34348                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
34349            }
34350            PARAM_EXT_VALUE_DATA::ID => {
34351                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
34352            }
34353            PARAM_MAP_RC_DATA::ID => {
34354                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
34355            }
34356            PARAM_REQUEST_LIST_DATA::ID => {
34357                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
34358            }
34359            PARAM_REQUEST_READ_DATA::ID => {
34360                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
34361            }
34362            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
34363            PARAM_VALUE_DATA::ID => {
34364                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
34365            }
34366            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
34367            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
34368            PLAY_TUNE_V2_DATA::ID => {
34369                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
34370            }
34371            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34372                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34373                    .map(Self::POSITION_TARGET_GLOBAL_INT)
34374            }
34375            POSITION_TARGET_LOCAL_NED_DATA::ID => {
34376                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34377                    .map(Self::POSITION_TARGET_LOCAL_NED)
34378            }
34379            POWER_STATUS_DATA::ID => {
34380                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
34381            }
34382            PROTOCOL_VERSION_DATA::ID => {
34383                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
34384            }
34385            RADIO_STATUS_DATA::ID => {
34386                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
34387            }
34388            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
34389            RAW_PRESSURE_DATA::ID => {
34390                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
34391            }
34392            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
34393            RC_CHANNELS_DATA::ID => {
34394                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
34395            }
34396            RC_CHANNELS_OVERRIDE_DATA::ID => {
34397                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
34398            }
34399            RC_CHANNELS_RAW_DATA::ID => {
34400                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
34401            }
34402            RC_CHANNELS_SCALED_DATA::ID => {
34403                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
34404            }
34405            REQUEST_DATA_STREAM_DATA::ID => {
34406                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
34407            }
34408            REQUEST_EVENT_DATA::ID => {
34409                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
34410            }
34411            RESOURCE_REQUEST_DATA::ID => {
34412                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
34413            }
34414            RESPONSE_EVENT_ERROR_DATA::ID => {
34415                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
34416            }
34417            SAFETY_ALLOWED_AREA_DATA::ID => {
34418                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
34419            }
34420            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
34421                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
34422                    .map(Self::SAFETY_SET_ALLOWED_AREA)
34423            }
34424            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
34425            SCALED_IMU2_DATA::ID => {
34426                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
34427            }
34428            SCALED_IMU3_DATA::ID => {
34429                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
34430            }
34431            SCALED_PRESSURE_DATA::ID => {
34432                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
34433            }
34434            SCALED_PRESSURE2_DATA::ID => {
34435                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
34436            }
34437            SCALED_PRESSURE3_DATA::ID => {
34438                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
34439            }
34440            SCRIPT_COUNT_DATA::ID => {
34441                SCRIPT_COUNT_DATA::deser(version, payload).map(Self::SCRIPT_COUNT)
34442            }
34443            SCRIPT_CURRENT_DATA::ID => {
34444                SCRIPT_CURRENT_DATA::deser(version, payload).map(Self::SCRIPT_CURRENT)
34445            }
34446            SCRIPT_ITEM_DATA::ID => {
34447                SCRIPT_ITEM_DATA::deser(version, payload).map(Self::SCRIPT_ITEM)
34448            }
34449            SCRIPT_REQUEST_DATA::ID => {
34450                SCRIPT_REQUEST_DATA::deser(version, payload).map(Self::SCRIPT_REQUEST)
34451            }
34452            SCRIPT_REQUEST_LIST_DATA::ID => {
34453                SCRIPT_REQUEST_LIST_DATA::deser(version, payload).map(Self::SCRIPT_REQUEST_LIST)
34454            }
34455            SERIAL_CONTROL_DATA::ID => {
34456                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
34457            }
34458            SERVO_OUTPUT_RAW_DATA::ID => {
34459                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
34460            }
34461            SETUP_SIGNING_DATA::ID => {
34462                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
34463            }
34464            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
34465                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34466                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
34467            }
34468            SET_ATTITUDE_TARGET_DATA::ID => {
34469                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
34470            }
34471            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
34472                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
34473            }
34474            SET_HOME_POSITION_DATA::ID => {
34475                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
34476            }
34477            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
34478            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34479                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34480                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
34481            }
34482            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
34483                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34484                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
34485            }
34486            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
34487            SMART_BATTERY_INFO_DATA::ID => {
34488                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
34489            }
34490            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
34491            STORAGE_INFORMATION_DATA::ID => {
34492                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
34493            }
34494            SUPPORTED_TUNES_DATA::ID => {
34495                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
34496            }
34497            SYSTEM_TIME_DATA::ID => {
34498                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
34499            }
34500            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
34501            TERRAIN_CHECK_DATA::ID => {
34502                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
34503            }
34504            TERRAIN_DATA_DATA::ID => {
34505                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
34506            }
34507            TERRAIN_REPORT_DATA::ID => {
34508                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
34509            }
34510            TERRAIN_REQUEST_DATA::ID => {
34511                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
34512            }
34513            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
34514            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
34515                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
34516                    .map(Self::TIME_ESTIMATE_TO_TARGET)
34517            }
34518            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34519                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
34520                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
34521            }
34522            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34523                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
34524                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
34525            }
34526            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
34527            UAVCAN_NODE_INFO_DATA::ID => {
34528                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
34529            }
34530            UAVCAN_NODE_STATUS_DATA::ID => {
34531                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
34532            }
34533            UTM_GLOBAL_POSITION_DATA::ID => {
34534                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
34535            }
34536            V2_EXTENSION_DATA::ID => {
34537                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
34538            }
34539            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
34540            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
34541            VICON_POSITION_ESTIMATE_DATA::ID => {
34542                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
34543                    .map(Self::VICON_POSITION_ESTIMATE)
34544            }
34545            VIDEO_STREAM_INFORMATION_DATA::ID => {
34546                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
34547                    .map(Self::VIDEO_STREAM_INFORMATION)
34548            }
34549            VIDEO_STREAM_STATUS_DATA::ID => {
34550                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
34551            }
34552            VISION_POSITION_ESTIMATE_DATA::ID => {
34553                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34554                    .map(Self::VISION_POSITION_ESTIMATE)
34555            }
34556            VISION_SPEED_ESTIMATE_DATA::ID => {
34557                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
34558            }
34559            WHEEL_DISTANCE_DATA::ID => {
34560                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
34561            }
34562            WIFI_CONFIG_AP_DATA::ID => {
34563                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
34564            }
34565            WINCH_STATUS_DATA::ID => {
34566                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
34567            }
34568            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
34569            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
34570        }
34571    }
34572    fn message_name(&self) -> &'static str {
34573        match self {
34574            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
34575            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
34576            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
34577            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
34578            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
34579            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
34580            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
34581            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
34582            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
34583            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
34584            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
34585            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34586                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
34587            }
34588            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
34589            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
34590            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
34591            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
34592            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
34593            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
34594            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
34595            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
34596            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
34597            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
34598            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
34599            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
34600            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
34601            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
34602            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
34603            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
34604            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
34605            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
34606            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
34607            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
34608            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
34609            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
34610            Self::COLLISION(..) => COLLISION_DATA::NAME,
34611            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
34612            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
34613            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
34614            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
34615            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
34616            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
34617            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
34618            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
34619            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
34620            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
34621            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
34622            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
34623            Self::DEBUG(..) => DEBUG_DATA::NAME,
34624            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
34625            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
34626            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
34627            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
34628            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
34629            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
34630            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
34631            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
34632            Self::EVENT(..) => EVENT_DATA::NAME,
34633            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
34634            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
34635            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
34636            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
34637            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
34638            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
34639            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
34640            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
34641            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
34642            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
34643            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
34644            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
34645            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34646                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
34647            }
34648            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
34649            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
34650            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
34651            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
34652            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
34653            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
34654            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
34655            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
34656            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
34657            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
34658            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
34659            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
34660            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
34661            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
34662            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
34663            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
34664            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
34665            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
34666            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
34667            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
34668            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
34669            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
34670            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
34671            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
34672            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
34673            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
34674            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
34675            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
34676            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
34677            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
34678            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
34679            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
34680            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
34681            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
34682            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34683                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
34684            }
34685            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
34686            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
34687            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
34688            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
34689            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
34690            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
34691            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
34692            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
34693            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
34694            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
34695            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
34696            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
34697            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
34698            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
34699            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
34700            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
34701            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
34702            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
34703            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
34704            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
34705            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
34706            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
34707            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
34708            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
34709            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
34710            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
34711            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
34712            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
34713            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
34714            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
34715            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
34716            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
34717            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
34718            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
34719            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
34720            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
34721            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
34722            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
34723            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
34724            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
34725            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
34726            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
34727            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
34728            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
34729            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
34730            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
34731            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
34732            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
34733            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
34734            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
34735            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
34736            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
34737            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
34738            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
34739            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
34740            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
34741            Self::PING(..) => PING_DATA::NAME,
34742            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
34743            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
34744            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34745            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
34746            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
34747            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
34748            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
34749            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
34750            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
34751            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
34752            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
34753            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
34754            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
34755            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
34756            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
34757            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
34758            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
34759            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
34760            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
34761            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
34762            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
34763            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
34764            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
34765            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
34766            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
34767            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
34768            Self::SCRIPT_COUNT(..) => SCRIPT_COUNT_DATA::NAME,
34769            Self::SCRIPT_CURRENT(..) => SCRIPT_CURRENT_DATA::NAME,
34770            Self::SCRIPT_ITEM(..) => SCRIPT_ITEM_DATA::NAME,
34771            Self::SCRIPT_REQUEST(..) => SCRIPT_REQUEST_DATA::NAME,
34772            Self::SCRIPT_REQUEST_LIST(..) => SCRIPT_REQUEST_LIST_DATA::NAME,
34773            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
34774            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
34775            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
34776            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
34777            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
34778            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
34779            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
34780            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
34781            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34782            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
34783            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
34784            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
34785            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
34786            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
34787            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
34788            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
34789            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
34790            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
34791            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
34792            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
34793            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
34794            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
34795            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
34796            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
34797                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
34798            }
34799            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34800                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
34801            }
34802            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
34803            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
34804            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
34805            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
34806            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
34807            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
34808            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
34809            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
34810            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
34811            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
34812            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
34813            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
34814            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
34815            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
34816            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
34817            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
34818        }
34819    }
34820    fn message_id(&self) -> u32 {
34821        match self {
34822            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
34823            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
34824            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
34825            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
34826            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
34827            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
34828            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
34829            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
34830            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
34831            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
34832            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
34833            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34834                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
34835            }
34836            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
34837            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
34838            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
34839            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
34840            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
34841            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
34842            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
34843            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
34844            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
34845            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
34846            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
34847            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
34848            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
34849            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
34850            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
34851            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
34852            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
34853            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
34854            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
34855            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
34856            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
34857            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
34858            Self::COLLISION(..) => COLLISION_DATA::ID,
34859            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
34860            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
34861            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
34862            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
34863            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
34864            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
34865            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
34866            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
34867            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
34868            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
34869            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
34870            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
34871            Self::DEBUG(..) => DEBUG_DATA::ID,
34872            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
34873            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
34874            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
34875            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
34876            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
34877            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
34878            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
34879            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
34880            Self::EVENT(..) => EVENT_DATA::ID,
34881            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
34882            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
34883            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
34884            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
34885            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
34886            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
34887            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
34888            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
34889            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
34890            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
34891            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
34892            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
34893            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34894                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
34895            }
34896            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
34897            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
34898            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
34899            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
34900            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
34901            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
34902            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
34903            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
34904            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
34905            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
34906            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
34907            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
34908            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
34909            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
34910            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
34911            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
34912            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
34913            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
34914            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
34915            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
34916            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
34917            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
34918            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
34919            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
34920            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
34921            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
34922            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
34923            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
34924            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
34925            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
34926            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
34927            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
34928            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
34929            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
34930            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34931                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
34932            }
34933            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
34934            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
34935            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
34936            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
34937            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
34938            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
34939            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
34940            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
34941            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
34942            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
34943            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
34944            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
34945            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
34946            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
34947            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
34948            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
34949            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
34950            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
34951            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
34952            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
34953            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
34954            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
34955            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
34956            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
34957            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
34958            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
34959            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
34960            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
34961            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
34962            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
34963            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
34964            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
34965            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
34966            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
34967            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
34968            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
34969            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
34970            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
34971            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
34972            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
34973            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
34974            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
34975            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
34976            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
34977            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
34978            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
34979            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
34980            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
34981            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
34982            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
34983            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
34984            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
34985            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
34986            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
34987            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
34988            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
34989            Self::PING(..) => PING_DATA::ID,
34990            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
34991            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
34992            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
34993            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
34994            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
34995            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
34996            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
34997            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
34998            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
34999            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
35000            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
35001            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
35002            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
35003            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
35004            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
35005            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
35006            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
35007            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
35008            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
35009            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
35010            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
35011            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
35012            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
35013            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
35014            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
35015            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
35016            Self::SCRIPT_COUNT(..) => SCRIPT_COUNT_DATA::ID,
35017            Self::SCRIPT_CURRENT(..) => SCRIPT_CURRENT_DATA::ID,
35018            Self::SCRIPT_ITEM(..) => SCRIPT_ITEM_DATA::ID,
35019            Self::SCRIPT_REQUEST(..) => SCRIPT_REQUEST_DATA::ID,
35020            Self::SCRIPT_REQUEST_LIST(..) => SCRIPT_REQUEST_LIST_DATA::ID,
35021            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
35022            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
35023            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
35024            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
35025            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
35026            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
35027            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
35028            Self::SET_MODE(..) => SET_MODE_DATA::ID,
35029            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
35030            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
35031            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
35032            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
35033            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
35034            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
35035            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
35036            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
35037            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
35038            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
35039            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
35040            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
35041            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
35042            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
35043            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
35044            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
35045            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
35046                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
35047            }
35048            Self::TUNNEL(..) => TUNNEL_DATA::ID,
35049            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
35050            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
35051            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
35052            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
35053            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
35054            Self::VIBRATION(..) => VIBRATION_DATA::ID,
35055            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
35056            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
35057            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
35058            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
35059            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
35060            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
35061            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
35062            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
35063            Self::WIND_COV(..) => WIND_COV_DATA::ID,
35064        }
35065    }
35066    fn message_id_from_name(name: &str) -> Option<u32> {
35067        match name {
35068            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
35069            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
35070            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
35071            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
35072            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
35073            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
35074            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
35075            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
35076            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
35077            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
35078            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
35079            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
35080                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
35081            }
35082            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
35083            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
35084            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
35085            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
35086            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
35087            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
35088            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
35089            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
35090            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
35091            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
35092            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
35093            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
35094            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
35095            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
35096            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
35097            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
35098            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
35099            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
35100            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
35101            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
35102            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
35103            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
35104            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
35105            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
35106            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
35107            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
35108            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
35109            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
35110            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
35111            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
35112            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
35113            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
35114            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
35115            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
35116            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
35117            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
35118            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
35119            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
35120            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
35121            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
35122            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
35123            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
35124            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
35125            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
35126            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
35127            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
35128            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
35129            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
35130            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
35131            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
35132            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
35133            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
35134            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
35135                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
35136            }
35137            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
35138            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
35139            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
35140            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
35141            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
35142                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
35143            }
35144            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
35145            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
35146            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
35147            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
35148            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
35149                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
35150            }
35151            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
35152            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
35153            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
35154            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
35155            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
35156            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
35157            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
35158            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
35159            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
35160            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
35161            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
35162            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
35163            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
35164            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
35165            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
35166            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
35167            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
35168            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
35169            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
35170            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
35171            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
35172            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
35173            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
35174            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
35175            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
35176            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
35177            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
35178            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
35179            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
35180            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
35181                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
35182            }
35183            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
35184            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
35185            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
35186            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
35187            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
35188            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
35189            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
35190            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
35191            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
35192            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
35193            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
35194            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
35195            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
35196            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
35197            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
35198            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
35199            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
35200            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
35201            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
35202            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
35203            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
35204            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
35205            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
35206            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
35207            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
35208            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
35209            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
35210            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
35211            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
35212            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
35213            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
35214            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
35215            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
35216            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
35217            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
35218            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
35219            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
35220            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
35221            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
35222            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
35223            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
35224            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
35225            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
35226            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
35227            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
35228            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
35229            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
35230            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
35231            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
35232            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
35233            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
35234            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
35235            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
35236            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
35237            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
35238            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
35239            PING_DATA::NAME => Some(PING_DATA::ID),
35240            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
35241            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
35242            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
35243            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
35244            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
35245            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
35246            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
35247            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
35248            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
35249            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
35250            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
35251            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
35252            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
35253            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
35254            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
35255            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
35256            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
35257            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
35258            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
35259            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
35260            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
35261            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
35262            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
35263            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
35264            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
35265            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
35266            SCRIPT_COUNT_DATA::NAME => Some(SCRIPT_COUNT_DATA::ID),
35267            SCRIPT_CURRENT_DATA::NAME => Some(SCRIPT_CURRENT_DATA::ID),
35268            SCRIPT_ITEM_DATA::NAME => Some(SCRIPT_ITEM_DATA::ID),
35269            SCRIPT_REQUEST_DATA::NAME => Some(SCRIPT_REQUEST_DATA::ID),
35270            SCRIPT_REQUEST_LIST_DATA::NAME => Some(SCRIPT_REQUEST_LIST_DATA::ID),
35271            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
35272            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
35273            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
35274            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
35275            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
35276            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
35277            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
35278            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
35279            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
35280                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
35281            }
35282            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
35283                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
35284            }
35285            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
35286            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
35287            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
35288            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
35289            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
35290            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
35291            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
35292            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
35293            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
35294            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
35295            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
35296            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
35297            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
35298            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
35299                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
35300            }
35301            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
35302                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
35303            }
35304            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
35305            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
35306            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
35307            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
35308            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
35309            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
35310            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
35311            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
35312            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
35313            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
35314            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
35315            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
35316            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
35317            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
35318            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
35319            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
35320            _ => None,
35321        }
35322    }
35323    fn default_message_from_id(id: u32) -> Option<Self> {
35324        match id {
35325            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35326                ACTUATOR_CONTROL_TARGET_DATA::default(),
35327            )),
35328            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35329                ACTUATOR_OUTPUT_STATUS_DATA::default(),
35330            )),
35331            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
35332            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
35333            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
35334            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
35335            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35336                ATTITUDE_QUATERNION_DATA::default(),
35337            )),
35338            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35339                ATTITUDE_QUATERNION_COV_DATA::default(),
35340            )),
35341            ATTITUDE_TARGET_DATA::ID => {
35342                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
35343            }
35344            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
35345            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
35346            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35347                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35348                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
35349                ))
35350            }
35351            AUTOPILOT_VERSION_DATA::ID => {
35352                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
35353            }
35354            AVAILABLE_MODES_DATA::ID => {
35355                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
35356            }
35357            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35358                AVAILABLE_MODES_MONITOR_DATA::default(),
35359            )),
35360            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
35361            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
35362            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
35363            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35364                CAMERA_CAPTURE_STATUS_DATA::default(),
35365            )),
35366            CAMERA_FOV_STATUS_DATA::ID => {
35367                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
35368            }
35369            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35370                CAMERA_IMAGE_CAPTURED_DATA::default(),
35371            )),
35372            CAMERA_INFORMATION_DATA::ID => {
35373                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
35374            }
35375            CAMERA_SETTINGS_DATA::ID => {
35376                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
35377            }
35378            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35379                CAMERA_THERMAL_RANGE_DATA::default(),
35380            )),
35381            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35382                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
35383            )),
35384            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35385                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
35386            )),
35387            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
35388            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
35389            CAN_FILTER_MODIFY_DATA::ID => {
35390                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
35391            }
35392            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
35393            CELLULAR_CONFIG_DATA::ID => {
35394                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
35395            }
35396            CELLULAR_STATUS_DATA::ID => {
35397                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
35398            }
35399            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35400                CHANGE_OPERATOR_CONTROL_DATA::default(),
35401            )),
35402            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35403                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
35404            )),
35405            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
35406            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
35407            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
35408            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
35409            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
35410            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35411                COMPONENT_INFORMATION_DATA::default(),
35412            )),
35413            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35414                COMPONENT_INFORMATION_BASIC_DATA::default(),
35415            )),
35416            COMPONENT_METADATA_DATA::ID => {
35417                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
35418            }
35419            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35420                CONTROL_SYSTEM_STATE_DATA::default(),
35421            )),
35422            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35423                CURRENT_EVENT_SEQUENCE_DATA::default(),
35424            )),
35425            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
35426            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
35427            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35428                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
35429            )),
35430            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
35431            DEBUG_FLOAT_ARRAY_DATA::ID => {
35432                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
35433            }
35434            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
35435            DISTANCE_SENSOR_DATA::ID => {
35436                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
35437            }
35438            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
35439            ENCAPSULATED_DATA_DATA::ID => {
35440                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
35441            }
35442            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
35443            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
35444            ESTIMATOR_STATUS_DATA::ID => {
35445                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
35446            }
35447            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
35448            EXTENDED_SYS_STATE_DATA::ID => {
35449                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
35450            }
35451            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
35452            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35453                FILE_TRANSFER_PROTOCOL_DATA::default(),
35454            )),
35455            FLIGHT_INFORMATION_DATA::ID => {
35456                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
35457            }
35458            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
35459            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
35460            GENERATOR_STATUS_DATA::ID => {
35461                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
35462            }
35463            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35464                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
35465            )),
35466            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35467                GIMBAL_DEVICE_INFORMATION_DATA::default(),
35468            )),
35469            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35470                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
35471            )),
35472            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35473                GIMBAL_MANAGER_INFORMATION_DATA::default(),
35474            )),
35475            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35476                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
35477            )),
35478            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35479                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35480                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
35481                ))
35482            }
35483            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35484                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
35485            )),
35486            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35487                GIMBAL_MANAGER_STATUS_DATA::default(),
35488            )),
35489            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35490                GLOBAL_POSITION_INT_DATA::default(),
35491            )),
35492            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35493                GLOBAL_POSITION_INT_COV_DATA::default(),
35494            )),
35495            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35496                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35497                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
35498                ))
35499            }
35500            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
35501            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
35502            GPS_GLOBAL_ORIGIN_DATA::ID => {
35503                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
35504            }
35505            GPS_INJECT_DATA_DATA::ID => {
35506                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
35507            }
35508            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
35509            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
35510            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
35511            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
35512            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
35513            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
35514            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
35515            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
35516            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
35517            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35518                HIL_ACTUATOR_CONTROLS_DATA::default(),
35519            )),
35520            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
35521            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
35522            HIL_OPTICAL_FLOW_DATA::ID => {
35523                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
35524            }
35525            HIL_RC_INPUTS_RAW_DATA::ID => {
35526                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
35527            }
35528            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
35529            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
35530            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35531                HIL_STATE_QUATERNION_DATA::default(),
35532            )),
35533            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
35534            HYGROMETER_SENSOR_DATA::ID => {
35535                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
35536            }
35537            ILLUMINATOR_STATUS_DATA::ID => {
35538                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
35539            }
35540            ISBD_LINK_STATUS_DATA::ID => {
35541                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
35542            }
35543            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
35544            LINK_NODE_STATUS_DATA::ID => {
35545                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
35546            }
35547            LOCAL_POSITION_NED_DATA::ID => {
35548                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
35549            }
35550            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35551                LOCAL_POSITION_NED_COV_DATA::default(),
35552            )),
35553            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35554                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35555                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
35556                ))
35557            }
35558            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
35559            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
35560            LOGGING_DATA_ACKED_DATA::ID => {
35561                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
35562            }
35563            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
35564            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
35565            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
35566            LOG_REQUEST_DATA_DATA::ID => {
35567                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
35568            }
35569            LOG_REQUEST_END_DATA::ID => {
35570                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
35571            }
35572            LOG_REQUEST_LIST_DATA::ID => {
35573                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
35574            }
35575            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
35576            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
35577            MANUAL_SETPOINT_DATA::ID => {
35578                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
35579            }
35580            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
35581            MESSAGE_INTERVAL_DATA::ID => {
35582                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
35583            }
35584            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
35585            MISSION_CLEAR_ALL_DATA::ID => {
35586                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
35587            }
35588            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
35589            MISSION_CURRENT_DATA::ID => {
35590                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
35591            }
35592            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
35593            MISSION_ITEM_INT_DATA::ID => {
35594                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
35595            }
35596            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35597                MISSION_ITEM_REACHED_DATA::default(),
35598            )),
35599            MISSION_REQUEST_DATA::ID => {
35600                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
35601            }
35602            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35603                MISSION_REQUEST_INT_DATA::default(),
35604            )),
35605            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35606                MISSION_REQUEST_LIST_DATA::default(),
35607            )),
35608            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35609                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
35610            )),
35611            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35612                MISSION_SET_CURRENT_DATA::default(),
35613            )),
35614            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35615                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
35616            )),
35617            MOUNT_ORIENTATION_DATA::ID => {
35618                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
35619            }
35620            NAMED_VALUE_FLOAT_DATA::ID => {
35621                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
35622            }
35623            NAMED_VALUE_INT_DATA::ID => {
35624                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
35625            }
35626            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35627                NAV_CONTROLLER_OUTPUT_DATA::default(),
35628            )),
35629            OBSTACLE_DISTANCE_DATA::ID => {
35630                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
35631            }
35632            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
35633            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35634                ONBOARD_COMPUTER_STATUS_DATA::default(),
35635            )),
35636            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35637                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
35638            )),
35639            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35640                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
35641            )),
35642            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35643                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
35644            )),
35645            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35646                OPEN_DRONE_ID_LOCATION_DATA::default(),
35647            )),
35648            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35649                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
35650            )),
35651            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35652                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
35653            )),
35654            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35655                OPEN_DRONE_ID_SELF_ID_DATA::default(),
35656            )),
35657            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35658                OPEN_DRONE_ID_SYSTEM_DATA::default(),
35659            )),
35660            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35661                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
35662            )),
35663            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
35664            OPTICAL_FLOW_RAD_DATA::ID => {
35665                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
35666            }
35667            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35668                ORBIT_EXECUTION_STATUS_DATA::default(),
35669            )),
35670            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
35671            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35672                PARAM_EXT_REQUEST_LIST_DATA::default(),
35673            )),
35674            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35675                PARAM_EXT_REQUEST_READ_DATA::default(),
35676            )),
35677            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
35678            PARAM_EXT_VALUE_DATA::ID => {
35679                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
35680            }
35681            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
35682            PARAM_REQUEST_LIST_DATA::ID => {
35683                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
35684            }
35685            PARAM_REQUEST_READ_DATA::ID => {
35686                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
35687            }
35688            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
35689            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
35690            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
35691            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
35692            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
35693            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35694                POSITION_TARGET_GLOBAL_INT_DATA::default(),
35695            )),
35696            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35697                POSITION_TARGET_LOCAL_NED_DATA::default(),
35698            )),
35699            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
35700            PROTOCOL_VERSION_DATA::ID => {
35701                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
35702            }
35703            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
35704            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
35705            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
35706            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
35707            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
35708            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35709                RC_CHANNELS_OVERRIDE_DATA::default(),
35710            )),
35711            RC_CHANNELS_RAW_DATA::ID => {
35712                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
35713            }
35714            RC_CHANNELS_SCALED_DATA::ID => {
35715                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
35716            }
35717            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35718                REQUEST_DATA_STREAM_DATA::default(),
35719            )),
35720            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
35721            RESOURCE_REQUEST_DATA::ID => {
35722                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
35723            }
35724            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35725                RESPONSE_EVENT_ERROR_DATA::default(),
35726            )),
35727            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35728                SAFETY_ALLOWED_AREA_DATA::default(),
35729            )),
35730            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35731                SAFETY_SET_ALLOWED_AREA_DATA::default(),
35732            )),
35733            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
35734            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
35735            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
35736            SCALED_PRESSURE_DATA::ID => {
35737                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
35738            }
35739            SCALED_PRESSURE2_DATA::ID => {
35740                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
35741            }
35742            SCALED_PRESSURE3_DATA::ID => {
35743                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
35744            }
35745            SCRIPT_COUNT_DATA::ID => Some(Self::SCRIPT_COUNT(SCRIPT_COUNT_DATA::default())),
35746            SCRIPT_CURRENT_DATA::ID => Some(Self::SCRIPT_CURRENT(SCRIPT_CURRENT_DATA::default())),
35747            SCRIPT_ITEM_DATA::ID => Some(Self::SCRIPT_ITEM(SCRIPT_ITEM_DATA::default())),
35748            SCRIPT_REQUEST_DATA::ID => Some(Self::SCRIPT_REQUEST(SCRIPT_REQUEST_DATA::default())),
35749            SCRIPT_REQUEST_LIST_DATA::ID => Some(Self::SCRIPT_REQUEST_LIST(
35750                SCRIPT_REQUEST_LIST_DATA::default(),
35751            )),
35752            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
35753            SERVO_OUTPUT_RAW_DATA::ID => {
35754                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
35755            }
35756            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
35757            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35758                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
35759            )),
35760            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35761                SET_ATTITUDE_TARGET_DATA::default(),
35762            )),
35763            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35764                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
35765            )),
35766            SET_HOME_POSITION_DATA::ID => {
35767                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
35768            }
35769            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
35770            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35771                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
35772            )),
35773            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35774                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
35775            )),
35776            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
35777            SMART_BATTERY_INFO_DATA::ID => {
35778                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
35779            }
35780            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
35781            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35782                STORAGE_INFORMATION_DATA::default(),
35783            )),
35784            SUPPORTED_TUNES_DATA::ID => {
35785                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
35786            }
35787            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
35788            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
35789            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
35790            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
35791            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
35792            TERRAIN_REQUEST_DATA::ID => {
35793                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
35794            }
35795            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
35796            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35797                TIME_ESTIMATE_TO_TARGET_DATA::default(),
35798            )),
35799            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35800                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35801                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
35802                ))
35803            }
35804            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35805                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35806                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
35807                ))
35808            }
35809            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
35810            UAVCAN_NODE_INFO_DATA::ID => {
35811                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
35812            }
35813            UAVCAN_NODE_STATUS_DATA::ID => {
35814                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
35815            }
35816            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35817                UTM_GLOBAL_POSITION_DATA::default(),
35818            )),
35819            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
35820            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
35821            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
35822            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35823                VICON_POSITION_ESTIMATE_DATA::default(),
35824            )),
35825            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35826                VIDEO_STREAM_INFORMATION_DATA::default(),
35827            )),
35828            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35829                VIDEO_STREAM_STATUS_DATA::default(),
35830            )),
35831            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35832                VISION_POSITION_ESTIMATE_DATA::default(),
35833            )),
35834            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35835                VISION_SPEED_ESTIMATE_DATA::default(),
35836            )),
35837            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
35838            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
35839            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
35840            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
35841            _ => None,
35842        }
35843    }
35844    #[cfg(feature = "arbitrary")]
35845    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
35846        match id {
35847            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35848                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35849            )),
35850            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35851                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
35852            )),
35853            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
35854            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
35855            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
35856            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
35857            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35858                ATTITUDE_QUATERNION_DATA::random(rng),
35859            )),
35860            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35861                ATTITUDE_QUATERNION_COV_DATA::random(rng),
35862            )),
35863            ATTITUDE_TARGET_DATA::ID => {
35864                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
35865            }
35866            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
35867            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
35868            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35869                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35870                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
35871                ))
35872            }
35873            AUTOPILOT_VERSION_DATA::ID => {
35874                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
35875            }
35876            AVAILABLE_MODES_DATA::ID => {
35877                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
35878            }
35879            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35880                AVAILABLE_MODES_MONITOR_DATA::random(rng),
35881            )),
35882            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
35883            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
35884            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
35885            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35886                CAMERA_CAPTURE_STATUS_DATA::random(rng),
35887            )),
35888            CAMERA_FOV_STATUS_DATA::ID => {
35889                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
35890            }
35891            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35892                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
35893            )),
35894            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
35895                CAMERA_INFORMATION_DATA::random(rng),
35896            )),
35897            CAMERA_SETTINGS_DATA::ID => {
35898                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
35899            }
35900            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35901                CAMERA_THERMAL_RANGE_DATA::random(rng),
35902            )),
35903            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35904                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
35905            )),
35906            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35907                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
35908            )),
35909            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
35910            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
35911            CAN_FILTER_MODIFY_DATA::ID => {
35912                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
35913            }
35914            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
35915            CELLULAR_CONFIG_DATA::ID => {
35916                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
35917            }
35918            CELLULAR_STATUS_DATA::ID => {
35919                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
35920            }
35921            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35922                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
35923            )),
35924            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35925                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
35926            )),
35927            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
35928            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
35929            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
35930            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
35931            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
35932            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35933                COMPONENT_INFORMATION_DATA::random(rng),
35934            )),
35935            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35936                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
35937            )),
35938            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
35939                COMPONENT_METADATA_DATA::random(rng),
35940            )),
35941            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35942                CONTROL_SYSTEM_STATE_DATA::random(rng),
35943            )),
35944            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35945                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
35946            )),
35947            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
35948            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
35949            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35950                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
35951            )),
35952            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
35953            DEBUG_FLOAT_ARRAY_DATA::ID => {
35954                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
35955            }
35956            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
35957            DISTANCE_SENSOR_DATA::ID => {
35958                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
35959            }
35960            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
35961            ENCAPSULATED_DATA_DATA::ID => {
35962                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
35963            }
35964            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
35965            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
35966            ESTIMATOR_STATUS_DATA::ID => {
35967                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
35968            }
35969            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
35970            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
35971                EXTENDED_SYS_STATE_DATA::random(rng),
35972            )),
35973            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
35974            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35975                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
35976            )),
35977            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
35978                FLIGHT_INFORMATION_DATA::random(rng),
35979            )),
35980            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
35981            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
35982            GENERATOR_STATUS_DATA::ID => {
35983                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
35984            }
35985            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35986                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
35987            )),
35988            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35989                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
35990            )),
35991            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35992                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
35993            )),
35994            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35995                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
35996            )),
35997            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35998                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
35999            )),
36000            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36001                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
36002                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
36003                ))
36004            }
36005            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
36006                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
36007            )),
36008            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
36009                GIMBAL_MANAGER_STATUS_DATA::random(rng),
36010            )),
36011            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
36012                GLOBAL_POSITION_INT_DATA::random(rng),
36013            )),
36014            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
36015                GLOBAL_POSITION_INT_COV_DATA::random(rng),
36016            )),
36017            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36018                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
36019                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
36020                ))
36021            }
36022            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
36023            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
36024            GPS_GLOBAL_ORIGIN_DATA::ID => {
36025                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
36026            }
36027            GPS_INJECT_DATA_DATA::ID => {
36028                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
36029            }
36030            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
36031            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
36032            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
36033            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
36034            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
36035            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
36036            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
36037            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
36038            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
36039            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
36040                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
36041            )),
36042            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
36043            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
36044            HIL_OPTICAL_FLOW_DATA::ID => {
36045                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
36046            }
36047            HIL_RC_INPUTS_RAW_DATA::ID => {
36048                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
36049            }
36050            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
36051            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
36052            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
36053                HIL_STATE_QUATERNION_DATA::random(rng),
36054            )),
36055            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
36056            HYGROMETER_SENSOR_DATA::ID => {
36057                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
36058            }
36059            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
36060                ILLUMINATOR_STATUS_DATA::random(rng),
36061            )),
36062            ISBD_LINK_STATUS_DATA::ID => {
36063                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
36064            }
36065            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
36066            LINK_NODE_STATUS_DATA::ID => {
36067                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
36068            }
36069            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
36070                LOCAL_POSITION_NED_DATA::random(rng),
36071            )),
36072            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
36073                LOCAL_POSITION_NED_COV_DATA::random(rng),
36074            )),
36075            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36076                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
36077                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
36078                ))
36079            }
36080            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
36081            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
36082            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
36083                LOGGING_DATA_ACKED_DATA::random(rng),
36084            )),
36085            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
36086            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
36087            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
36088            LOG_REQUEST_DATA_DATA::ID => {
36089                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
36090            }
36091            LOG_REQUEST_END_DATA::ID => {
36092                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
36093            }
36094            LOG_REQUEST_LIST_DATA::ID => {
36095                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
36096            }
36097            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
36098            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
36099            MANUAL_SETPOINT_DATA::ID => {
36100                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
36101            }
36102            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
36103            MESSAGE_INTERVAL_DATA::ID => {
36104                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
36105            }
36106            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
36107            MISSION_CLEAR_ALL_DATA::ID => {
36108                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
36109            }
36110            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
36111            MISSION_CURRENT_DATA::ID => {
36112                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
36113            }
36114            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
36115            MISSION_ITEM_INT_DATA::ID => {
36116                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
36117            }
36118            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
36119                MISSION_ITEM_REACHED_DATA::random(rng),
36120            )),
36121            MISSION_REQUEST_DATA::ID => {
36122                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
36123            }
36124            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
36125                MISSION_REQUEST_INT_DATA::random(rng),
36126            )),
36127            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
36128                MISSION_REQUEST_LIST_DATA::random(rng),
36129            )),
36130            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
36131                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
36132            )),
36133            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
36134                MISSION_SET_CURRENT_DATA::random(rng),
36135            )),
36136            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
36137                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
36138            )),
36139            MOUNT_ORIENTATION_DATA::ID => {
36140                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
36141            }
36142            NAMED_VALUE_FLOAT_DATA::ID => {
36143                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
36144            }
36145            NAMED_VALUE_INT_DATA::ID => {
36146                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
36147            }
36148            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
36149                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
36150            )),
36151            OBSTACLE_DISTANCE_DATA::ID => {
36152                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
36153            }
36154            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
36155            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
36156                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
36157            )),
36158            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
36159                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
36160            )),
36161            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
36162                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
36163            )),
36164            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
36165                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
36166            )),
36167            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
36168                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
36169            )),
36170            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
36171                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
36172            )),
36173            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
36174                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
36175            )),
36176            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
36177                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
36178            )),
36179            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
36180                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
36181            )),
36182            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
36183                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
36184            )),
36185            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
36186            OPTICAL_FLOW_RAD_DATA::ID => {
36187                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
36188            }
36189            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
36190                ORBIT_EXECUTION_STATUS_DATA::random(rng),
36191            )),
36192            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
36193            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
36194                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
36195            )),
36196            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
36197                PARAM_EXT_REQUEST_READ_DATA::random(rng),
36198            )),
36199            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
36200            PARAM_EXT_VALUE_DATA::ID => {
36201                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
36202            }
36203            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
36204            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
36205                PARAM_REQUEST_LIST_DATA::random(rng),
36206            )),
36207            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
36208                PARAM_REQUEST_READ_DATA::random(rng),
36209            )),
36210            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
36211            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
36212            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
36213            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
36214            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
36215            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
36216                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
36217            )),
36218            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
36219                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
36220            )),
36221            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
36222            PROTOCOL_VERSION_DATA::ID => {
36223                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
36224            }
36225            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
36226            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
36227            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
36228            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
36229            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
36230            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
36231                RC_CHANNELS_OVERRIDE_DATA::random(rng),
36232            )),
36233            RC_CHANNELS_RAW_DATA::ID => {
36234                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
36235            }
36236            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
36237                RC_CHANNELS_SCALED_DATA::random(rng),
36238            )),
36239            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
36240                REQUEST_DATA_STREAM_DATA::random(rng),
36241            )),
36242            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
36243            RESOURCE_REQUEST_DATA::ID => {
36244                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
36245            }
36246            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
36247                RESPONSE_EVENT_ERROR_DATA::random(rng),
36248            )),
36249            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
36250                SAFETY_ALLOWED_AREA_DATA::random(rng),
36251            )),
36252            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
36253                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
36254            )),
36255            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
36256            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
36257            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
36258            SCALED_PRESSURE_DATA::ID => {
36259                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
36260            }
36261            SCALED_PRESSURE2_DATA::ID => {
36262                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
36263            }
36264            SCALED_PRESSURE3_DATA::ID => {
36265                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
36266            }
36267            SCRIPT_COUNT_DATA::ID => Some(Self::SCRIPT_COUNT(SCRIPT_COUNT_DATA::random(rng))),
36268            SCRIPT_CURRENT_DATA::ID => Some(Self::SCRIPT_CURRENT(SCRIPT_CURRENT_DATA::random(rng))),
36269            SCRIPT_ITEM_DATA::ID => Some(Self::SCRIPT_ITEM(SCRIPT_ITEM_DATA::random(rng))),
36270            SCRIPT_REQUEST_DATA::ID => Some(Self::SCRIPT_REQUEST(SCRIPT_REQUEST_DATA::random(rng))),
36271            SCRIPT_REQUEST_LIST_DATA::ID => Some(Self::SCRIPT_REQUEST_LIST(
36272                SCRIPT_REQUEST_LIST_DATA::random(rng),
36273            )),
36274            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
36275            SERVO_OUTPUT_RAW_DATA::ID => {
36276                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
36277            }
36278            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
36279            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
36280                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
36281            )),
36282            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
36283                SET_ATTITUDE_TARGET_DATA::random(rng),
36284            )),
36285            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
36286                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
36287            )),
36288            SET_HOME_POSITION_DATA::ID => {
36289                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
36290            }
36291            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
36292            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
36293                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
36294            )),
36295            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
36296                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
36297            )),
36298            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
36299            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
36300                SMART_BATTERY_INFO_DATA::random(rng),
36301            )),
36302            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
36303            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
36304                STORAGE_INFORMATION_DATA::random(rng),
36305            )),
36306            SUPPORTED_TUNES_DATA::ID => {
36307                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
36308            }
36309            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
36310            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
36311            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
36312            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
36313            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
36314            TERRAIN_REQUEST_DATA::ID => {
36315                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
36316            }
36317            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
36318            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
36319                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
36320            )),
36321            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36322                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
36323                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
36324                ))
36325            }
36326            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36327                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
36328                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
36329                ))
36330            }
36331            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
36332            UAVCAN_NODE_INFO_DATA::ID => {
36333                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
36334            }
36335            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
36336                UAVCAN_NODE_STATUS_DATA::random(rng),
36337            )),
36338            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
36339                UTM_GLOBAL_POSITION_DATA::random(rng),
36340            )),
36341            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
36342            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
36343            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
36344            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
36345                VICON_POSITION_ESTIMATE_DATA::random(rng),
36346            )),
36347            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
36348                VIDEO_STREAM_INFORMATION_DATA::random(rng),
36349            )),
36350            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
36351                VIDEO_STREAM_STATUS_DATA::random(rng),
36352            )),
36353            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
36354                VISION_POSITION_ESTIMATE_DATA::random(rng),
36355            )),
36356            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
36357                VISION_SPEED_ESTIMATE_DATA::random(rng),
36358            )),
36359            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
36360            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
36361            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
36362            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
36363            _ => None,
36364        }
36365    }
36366    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
36367        match self {
36368            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36369            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
36370            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
36371            Self::AIS_VESSEL(body) => body.ser(version, bytes),
36372            Self::ALTITUDE(body) => body.ser(version, bytes),
36373            Self::ATTITUDE(body) => body.ser(version, bytes),
36374            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
36375            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
36376            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
36377            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
36378            Self::AUTH_KEY(body) => body.ser(version, bytes),
36379            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
36380            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
36381            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
36382            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
36383            Self::BATTERY_INFO(body) => body.ser(version, bytes),
36384            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
36385            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
36386            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
36387            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
36388            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
36389            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
36390            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
36391            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
36392            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
36393            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
36394            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
36395            Self::CANFD_FRAME(body) => body.ser(version, bytes),
36396            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
36397            Self::CAN_FRAME(body) => body.ser(version, bytes),
36398            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
36399            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
36400            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
36401            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
36402            Self::COLLISION(body) => body.ser(version, bytes),
36403            Self::COMMAND_ACK(body) => body.ser(version, bytes),
36404            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
36405            Self::COMMAND_INT(body) => body.ser(version, bytes),
36406            Self::COMMAND_LONG(body) => body.ser(version, bytes),
36407            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
36408            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
36409            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
36410            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
36411            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
36412            Self::CURRENT_MODE(body) => body.ser(version, bytes),
36413            Self::DATA_STREAM(body) => body.ser(version, bytes),
36414            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
36415            Self::DEBUG(body) => body.ser(version, bytes),
36416            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
36417            Self::DEBUG_VECT(body) => body.ser(version, bytes),
36418            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
36419            Self::EFI_STATUS(body) => body.ser(version, bytes),
36420            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
36421            Self::ESC_INFO(body) => body.ser(version, bytes),
36422            Self::ESC_STATUS(body) => body.ser(version, bytes),
36423            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
36424            Self::EVENT(body) => body.ser(version, bytes),
36425            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
36426            Self::FENCE_STATUS(body) => body.ser(version, bytes),
36427            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
36428            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
36429            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
36430            Self::FUEL_STATUS(body) => body.ser(version, bytes),
36431            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
36432            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
36433            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
36434            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
36435            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
36436            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
36437            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
36438            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
36439            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
36440            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
36441            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
36442            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36443            Self::GPS2_RAW(body) => body.ser(version, bytes),
36444            Self::GPS2_RTK(body) => body.ser(version, bytes),
36445            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36446            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
36447            Self::GPS_INPUT(body) => body.ser(version, bytes),
36448            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
36449            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
36450            Self::GPS_RTK(body) => body.ser(version, bytes),
36451            Self::GPS_STATUS(body) => body.ser(version, bytes),
36452            Self::HEARTBEAT(body) => body.ser(version, bytes),
36453            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
36454            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
36455            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
36456            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
36457            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
36458            Self::HIL_GPS(body) => body.ser(version, bytes),
36459            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
36460            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
36461            Self::HIL_SENSOR(body) => body.ser(version, bytes),
36462            Self::HIL_STATE(body) => body.ser(version, bytes),
36463            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
36464            Self::HOME_POSITION(body) => body.ser(version, bytes),
36465            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
36466            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
36467            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
36468            Self::LANDING_TARGET(body) => body.ser(version, bytes),
36469            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
36470            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
36471            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
36472            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
36473            Self::LOGGING_ACK(body) => body.ser(version, bytes),
36474            Self::LOGGING_DATA(body) => body.ser(version, bytes),
36475            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
36476            Self::LOG_DATA(body) => body.ser(version, bytes),
36477            Self::LOG_ENTRY(body) => body.ser(version, bytes),
36478            Self::LOG_ERASE(body) => body.ser(version, bytes),
36479            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
36480            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
36481            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
36482            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
36483            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
36484            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
36485            Self::MEMORY_VECT(body) => body.ser(version, bytes),
36486            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
36487            Self::MISSION_ACK(body) => body.ser(version, bytes),
36488            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
36489            Self::MISSION_COUNT(body) => body.ser(version, bytes),
36490            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
36491            Self::MISSION_ITEM(body) => body.ser(version, bytes),
36492            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
36493            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
36494            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
36495            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
36496            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
36497            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
36498            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
36499            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
36500            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
36501            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
36502            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
36503            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
36504            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
36505            Self::ODOMETRY(body) => body.ser(version, bytes),
36506            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
36507            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
36508            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
36509            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
36510            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
36511            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
36512            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
36513            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
36514            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
36515            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
36516            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
36517            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
36518            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
36519            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
36520            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
36521            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
36522            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
36523            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
36524            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
36525            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
36526            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
36527            Self::PARAM_SET(body) => body.ser(version, bytes),
36528            Self::PARAM_VALUE(body) => body.ser(version, bytes),
36529            Self::PING(body) => body.ser(version, bytes),
36530            Self::PLAY_TUNE(body) => body.ser(version, bytes),
36531            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
36532            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36533            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36534            Self::POWER_STATUS(body) => body.ser(version, bytes),
36535            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
36536            Self::RADIO_STATUS(body) => body.ser(version, bytes),
36537            Self::RAW_IMU(body) => body.ser(version, bytes),
36538            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
36539            Self::RAW_RPM(body) => body.ser(version, bytes),
36540            Self::RC_CHANNELS(body) => body.ser(version, bytes),
36541            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
36542            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
36543            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
36544            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
36545            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
36546            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
36547            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
36548            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
36549            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
36550            Self::SCALED_IMU(body) => body.ser(version, bytes),
36551            Self::SCALED_IMU2(body) => body.ser(version, bytes),
36552            Self::SCALED_IMU3(body) => body.ser(version, bytes),
36553            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
36554            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
36555            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
36556            Self::SCRIPT_COUNT(body) => body.ser(version, bytes),
36557            Self::SCRIPT_CURRENT(body) => body.ser(version, bytes),
36558            Self::SCRIPT_ITEM(body) => body.ser(version, bytes),
36559            Self::SCRIPT_REQUEST(body) => body.ser(version, bytes),
36560            Self::SCRIPT_REQUEST_LIST(body) => body.ser(version, bytes),
36561            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
36562            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
36563            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
36564            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36565            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
36566            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36567            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
36568            Self::SET_MODE(body) => body.ser(version, bytes),
36569            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36570            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36571            Self::SIM_STATE(body) => body.ser(version, bytes),
36572            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
36573            Self::STATUSTEXT(body) => body.ser(version, bytes),
36574            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
36575            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
36576            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
36577            Self::SYS_STATUS(body) => body.ser(version, bytes),
36578            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
36579            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
36580            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
36581            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
36582            Self::TIMESYNC(body) => body.ser(version, bytes),
36583            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
36584            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
36585            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
36586            Self::TUNNEL(body) => body.ser(version, bytes),
36587            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
36588            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
36589            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
36590            Self::V2_EXTENSION(body) => body.ser(version, bytes),
36591            Self::VFR_HUD(body) => body.ser(version, bytes),
36592            Self::VIBRATION(body) => body.ser(version, bytes),
36593            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36594            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
36595            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
36596            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36597            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
36598            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
36599            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
36600            Self::WINCH_STATUS(body) => body.ser(version, bytes),
36601            Self::WIND_COV(body) => body.ser(version, bytes),
36602        }
36603    }
36604    fn extra_crc(id: u32) -> u8 {
36605        match id {
36606            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36607            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
36608            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
36609            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
36610            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
36611            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
36612            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
36613            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
36614            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
36615            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
36616            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
36617            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36618                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
36619            }
36620            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
36621            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
36622            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
36623            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
36624            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
36625            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
36626            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
36627            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
36628            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
36629            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
36630            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
36631            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
36632            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
36633            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
36634            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
36635            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
36636            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
36637            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
36638            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
36639            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
36640            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
36641            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
36642            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
36643            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
36644            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
36645            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
36646            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
36647            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
36648            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
36649            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
36650            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
36651            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
36652            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
36653            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
36654            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
36655            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
36656            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
36657            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
36658            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
36659            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
36660            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
36661            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
36662            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
36663            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
36664            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
36665            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
36666            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
36667            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
36668            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
36669            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
36670            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
36671            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
36672            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
36673            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
36674            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
36675            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
36676            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
36677            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36678                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
36679            }
36680            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
36681            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
36682            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
36683            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
36684            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36685                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
36686            }
36687            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
36688            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
36689            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36690            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
36691            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
36692            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
36693            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
36694            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
36695            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
36696            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
36697            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
36698            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
36699            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
36700            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
36701            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
36702            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
36703            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
36704            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
36705            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
36706            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
36707            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
36708            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
36709            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
36710            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
36711            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
36712            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
36713            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
36714            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
36715            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
36716            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36717                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
36718            }
36719            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
36720            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
36721            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
36722            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
36723            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
36724            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
36725            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
36726            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
36727            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
36728            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
36729            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
36730            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
36731            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
36732            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
36733            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
36734            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
36735            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
36736            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
36737            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
36738            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
36739            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
36740            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
36741            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
36742            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
36743            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
36744            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
36745            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
36746            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
36747            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
36748            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
36749            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
36750            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
36751            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
36752            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
36753            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
36754            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
36755            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
36756            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
36757            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
36758            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
36759            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
36760            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
36761            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
36762            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
36763            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
36764            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
36765            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
36766            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
36767            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
36768            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
36769            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
36770            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
36771            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
36772            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
36773            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
36774            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
36775            PING_DATA::ID => PING_DATA::EXTRA_CRC,
36776            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
36777            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
36778            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
36779            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36780            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
36781            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
36782            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
36783            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
36784            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
36785            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
36786            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
36787            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
36788            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
36789            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
36790            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
36791            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
36792            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
36793            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
36794            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
36795            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
36796            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
36797            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
36798            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
36799            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
36800            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
36801            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
36802            SCRIPT_COUNT_DATA::ID => SCRIPT_COUNT_DATA::EXTRA_CRC,
36803            SCRIPT_CURRENT_DATA::ID => SCRIPT_CURRENT_DATA::EXTRA_CRC,
36804            SCRIPT_ITEM_DATA::ID => SCRIPT_ITEM_DATA::EXTRA_CRC,
36805            SCRIPT_REQUEST_DATA::ID => SCRIPT_REQUEST_DATA::EXTRA_CRC,
36806            SCRIPT_REQUEST_LIST_DATA::ID => SCRIPT_REQUEST_LIST_DATA::EXTRA_CRC,
36807            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
36808            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
36809            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
36810            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36811            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
36812            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36813            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
36814            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
36815            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36816                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
36817            }
36818            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36819            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
36820            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
36821            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
36822            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
36823            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
36824            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
36825            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
36826            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
36827            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
36828            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
36829            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
36830            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
36831            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
36832            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36833                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
36834            }
36835            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36836                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
36837            }
36838            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
36839            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
36840            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
36841            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
36842            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
36843            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
36844            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
36845            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36846            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
36847            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
36848            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36849            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
36850            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
36851            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
36852            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
36853            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
36854            _ => 0,
36855        }
36856    }
36857    fn target_system_id(&self) -> Option<u8> {
36858        match self {
36859            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
36860            Self::CANFD_FRAME(inner) => Some(inner.target_system),
36861            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
36862            Self::CAN_FRAME(inner) => Some(inner.target_system),
36863            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
36864            Self::COMMAND_ACK(inner) => Some(inner.target_system),
36865            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
36866            Self::COMMAND_INT(inner) => Some(inner.target_system),
36867            Self::COMMAND_LONG(inner) => Some(inner.target_system),
36868            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
36869            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
36870            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
36871            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
36872            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
36873            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
36874            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
36875            Self::LOGGING_ACK(inner) => Some(inner.target_system),
36876            Self::LOGGING_DATA(inner) => Some(inner.target_system),
36877            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
36878            Self::LOG_ERASE(inner) => Some(inner.target_system),
36879            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
36880            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
36881            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
36882            Self::MISSION_ACK(inner) => Some(inner.target_system),
36883            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
36884            Self::MISSION_COUNT(inner) => Some(inner.target_system),
36885            Self::MISSION_ITEM(inner) => Some(inner.target_system),
36886            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
36887            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
36888            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
36889            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
36890            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
36891            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
36892            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
36893            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
36894            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
36895            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
36896            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
36897            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
36898            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
36899            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
36900            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
36901            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
36902            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
36903            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
36904            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
36905            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
36906            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
36907            Self::PARAM_SET(inner) => Some(inner.target_system),
36908            Self::PING(inner) => Some(inner.target_system),
36909            Self::PLAY_TUNE(inner) => Some(inner.target_system),
36910            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
36911            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
36912            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
36913            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
36914            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
36915            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
36916            Self::SCRIPT_COUNT(inner) => Some(inner.target_system),
36917            Self::SCRIPT_ITEM(inner) => Some(inner.target_system),
36918            Self::SCRIPT_REQUEST(inner) => Some(inner.target_system),
36919            Self::SCRIPT_REQUEST_LIST(inner) => Some(inner.target_system),
36920            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
36921            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
36922            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
36923            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
36924            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
36925            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
36926            Self::SET_MODE(inner) => Some(inner.target_system),
36927            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
36928            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
36929            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
36930            Self::TIMESYNC(inner) => Some(inner.target_system),
36931            Self::TUNNEL(inner) => Some(inner.target_system),
36932            Self::V2_EXTENSION(inner) => Some(inner.target_system),
36933            _ => None,
36934        }
36935    }
36936    fn target_component_id(&self) -> Option<u8> {
36937        match self {
36938            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
36939            Self::CANFD_FRAME(inner) => Some(inner.target_component),
36940            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
36941            Self::CAN_FRAME(inner) => Some(inner.target_component),
36942            Self::COMMAND_ACK(inner) => Some(inner.target_component),
36943            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
36944            Self::COMMAND_INT(inner) => Some(inner.target_component),
36945            Self::COMMAND_LONG(inner) => Some(inner.target_component),
36946            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
36947            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
36948            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
36949            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
36950            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
36951            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
36952            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
36953            Self::LOGGING_ACK(inner) => Some(inner.target_component),
36954            Self::LOGGING_DATA(inner) => Some(inner.target_component),
36955            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
36956            Self::LOG_ERASE(inner) => Some(inner.target_component),
36957            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
36958            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
36959            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
36960            Self::MISSION_ACK(inner) => Some(inner.target_component),
36961            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
36962            Self::MISSION_COUNT(inner) => Some(inner.target_component),
36963            Self::MISSION_ITEM(inner) => Some(inner.target_component),
36964            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
36965            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
36966            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
36967            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
36968            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
36969            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
36970            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
36971            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
36972            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
36973            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
36974            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
36975            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
36976            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
36977            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
36978            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
36979            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
36980            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
36981            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
36982            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
36983            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
36984            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
36985            Self::PARAM_SET(inner) => Some(inner.target_component),
36986            Self::PING(inner) => Some(inner.target_component),
36987            Self::PLAY_TUNE(inner) => Some(inner.target_component),
36988            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
36989            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
36990            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
36991            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
36992            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
36993            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
36994            Self::SCRIPT_COUNT(inner) => Some(inner.target_component),
36995            Self::SCRIPT_ITEM(inner) => Some(inner.target_component),
36996            Self::SCRIPT_REQUEST(inner) => Some(inner.target_component),
36997            Self::SCRIPT_REQUEST_LIST(inner) => Some(inner.target_component),
36998            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
36999            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
37000            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
37001            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
37002            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
37003            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
37004            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
37005            Self::TIMESYNC(inner) => Some(inner.target_component),
37006            Self::TUNNEL(inner) => Some(inner.target_component),
37007            Self::V2_EXTENSION(inner) => Some(inner.target_component),
37008            _ => None,
37009        }
37010    }
37011}